aboutsummaryrefslogtreecommitdiff
path: root/absl/functional/any_invocable.h
Commit message (Collapse)AuthorAgeFilesLines
* `any_invocable`: Clean up #includesDino Radakovic2024-05-081-0/+1
| | | | | | | | | - remove [<initializer_list>](https://en.cppreference.com/w/cpp/header/initializer_list) from internal header. It declares `std::initializer_list`, `std::begin` and `std::end`, none of which are used there - add `absl/base/attributes.h` to the internal header because it provides `ABSL_FALLTHROUGH_INTENDED` - add [<functional>](https://en.cppreference.com/w/cpp/header/functional) to the public header, because it provides `std::reference_wrapper` PiperOrigin-RevId: 632018125 Change-Id: Icf7a9c8a920c9c076ef416ea80995e3a81ce3e81
* `any_invocable`: Add public documentation for undefined behavior when ↵Dino Radakovic2024-05-071-0/+9
| | | | | | | | | | invoking an empty AnyInvocable This is currently documented in `internal/any_invocable.h`, but not in the public API. For example, `std::function` [documents](https://en.cppreference.com/w/cpp/utility/functional/function) the fact that invoking an empty instance throws `std::bad_function_call`. PiperOrigin-RevId: 631621604 Change-Id: I6b886a805ffa0e7aaef5f6971e1eafd14f94050c
* Fix order of qualifiers in `absl::AnyInvocable` documentation.Abseil Team2024-04-261-3/+3
| | | | | PiperOrigin-RevId: 628424298 Change-Id: Ia4d15decff040add1b161cd9b472f19f562c49f9
* Document that wrapping an empty `std::function` creates a non-empty ↵Dino Radakovic2023-04-061-0/+8
| | | | | | | `AnyInvocable` PiperOrigin-RevId: 522411202 Change-Id: Ifc99f5f6a227efd697039344ea75f53c6f282e53
* Fix typo in commentDino Radakovic2023-04-061-1/+1
| | | | | PiperOrigin-RevId: 522392902 Change-Id: I5764edbe85612e90d02caae49bbf629dcb8879e3
* Detects accidental multiple invocations of ↵Abseil Team2022-10-111-0/+3
| | | | | | | AnyInvocable<R(...)&&>::operator()&& by producing an error in debug mode, and clarifies that the behavior is undefined in the general case. PiperOrigin-RevId: 480392976 Change-Id: I2d4c6f213fa7c8747f125c9735272a8e47b9214b
* AnyInvocable: Move credits to the top of the fileDino Radakovic2022-06-241-3/+3
| | | | | PiperOrigin-RevId: 457014105 Change-Id: I4ecd4185385a213838c6f3241b65536b1f833705
* Release absl::AnyInvocableDino Radakovic2022-06-161-0/+313
AnyInvocable is a C++11 compatible equivalent of the C++23 [std::move_only_function](https://en.cppreference.com/w/cpp/utility/functional/move_only_function/move_only_function). Although this implementation matches an intermediate draft revision of the standard (http://wg21.link/p0288r5), it is neither a standard tracking type nor a seamless backfill type. PiperOrigin-RevId: 455494585 Change-Id: If01565f8eecc78eee38fb794ef142b32b31abc7c