File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -279,11 +279,10 @@ class AnyInvocable : private internal_any_invocable::Impl<Sig> {
279279 //
280280 // WARNING: An `AnyInvocable` that wraps an empty `std::function` is not
281281 // itself empty. This behavior is consistent with the standard equivalent
282- // `std::move_only_function`.
283- //
284- // In other words:
282+ // `std::move_only_function`. In the following example, `a()` will actually
283+ // invoke `f()`, leading to an `std::bad_function_call` exception:
285284 // std::function<void()> f; // empty
286- // absl::AnyInvocable<void()> a = std::move(f) ; // not empty
285+ // absl::AnyInvocable<void()> a = f ; // not empty
287286 //
288287 // Invoking an empty `AnyInvocable` results in undefined behavior.
289288 explicit operator bool () const noexcept { return this ->HasValue (); }
You can’t perform that action at this time.
0 commit comments