Lines Matching +full:dangling +full:- +full:reference
7 // https://www.apache.org/licenses/LICENSE-2.0
15 // -----------------------------------------------------------------------------
17 // -----------------------------------------------------------------------------
24 // `absl::bind_front()` is meant as a drop-in replacement for C++20's upcoming
53 // mis-uses as errors. In C++20, `absl::bind_front` is replaced by
61 // int Minus(int a, int b) { return a - b; }
63 // assert(absl::bind_front(Minus)(3, 2) == 3 - 2);
64 // assert(absl::bind_front(Minus, 3)(2) == 3 - 2);
65 // assert(absl::bind_front(Minus, 3, 2)() == 3 - 2);
92 // Executor::DefaultExecutor()->Schedule(
119 // e->Schedule(absl::bind_front(LogStringView, sv)); // ERROR: dangling
122 // e->Schedule(absl::bind_front(LogStringView, s)); // OK: stores a copy of
125 // To store some of the arguments passed to `absl::bind_front()` by reference,
128 // Example: Storing some of the bound arguments by reference.
134 // // It's safe to store a reference to it inside the functor.
135 // Executor::DefaultExecutor()->Schedule(
144 // Example: Storing bound arguments by reference.
157 // // dangling references.
158 // foo->DoInFuture(absl::bind_front(Print, std::ref(hi), "Guest")); // BAD!
161 // Example: Storing reference-like types.