aboutsummaryrefslogtreecommitdiff
path: root/absl/functional/internal/any_invocable.h
Commit message (Collapse)AuthorAgeFilesLines
* `any_invocable`: Clean up #includesDino Radakovic2024-05-081-1/+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-1/+1
| | | | | | | | | | 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
* `any_invocable`: Delete obsolete reference to proposed standard typeDino Radakovic2024-05-071-5/+5
| | | | | | | | The comment calls if `any_invocable`, but the standard ultimately chose [`move_only_function`](https://en.cppreference.com/w/cpp/utility/functional/move_only_function/move_only_function). And `absl::AnyInvocable` does not officially track the standard. PiperOrigin-RevId: 631612663 Change-Id: I3f21f33cd6e2c6ce06ac92a8d2a68db6f942ea1b
* Fix error in GCC warning suppressionDerek Mauro2023-10-061-2/+2
| | | | | PiperOrigin-RevId: 571347014 Change-Id: I716ca435128081f0e9b0434143103df579256f50
* AnyInvocable: Use enums instead of ints in initialization overload setDino Radakovic2023-06-261-15/+16
| | | | | | | This trick was introduced to work around a compiler bug in msvc 2017, which abseil doesn't support anymore: https://github.com/google/oss-policies-info/blob/3aa4b98f497fdfac983b8de78cf6bd693cb0cf4f/foundational-cxx-support-matrix.md PiperOrigin-RevId: 543477428 Change-Id: I332c1b359b75811536ce900d3166979ac3c196a3
* CI: Move the GCC-latest testing to GCC 13.1 on LinuxDerek Mauro2023-05-221-0/+8
| | | | | | | | | | This includes an upgrade to CMake 3.26.3 and Bazel 6.2.0 This change includes support for both GCC 12 and 13 since we were only testing GCC 11 before this change. PiperOrigin-RevId: 534235753 Change-Id: I4183a02469b1c3425c52a31b71fcefe403315a42
* Merge pull request #1448 from glandium:clangCopybara-Service2023-05-181-1/+1
|\ | | | | | | | | PiperOrigin-RevId: 533121605 Change-Id: I82390045985db5db56e93c40eae24cdcd93e3ab4
| * Use UB impl of launder on when using clang < 8 and c++17Mike Hommey2023-05-181-1/+1
|/ | | | | | | libstdc++'s definition of std::launder places it behind a check for __builtin_launder, which is not available before clang 8. Fixes: #1309
* Remove ABSL_HARDENING_ASSERT in AnyInvocable to avoid performance impact in ↵Abseil Team2023-05-111-1/+1
| | | | | | | optimized builds PiperOrigin-RevId: 531301442 Change-Id: Ib5a67f827bf89a66a0a8d24d3191f278566af6c8
* Fix some spelling mistakesVertexwahn2023-04-241-1/+1
|
* Add missing #include <exception> for std::terminateAbseil Team2023-03-201-0/+1
| | | | | | | | It was previously included transitively through some other header, but with recent libc++ versions that's no longer the case. PiperOrigin-RevId: 517969848 Change-Id: I83c5c1853ae27b64a53a75a0f2faead37a70c145
* Move lambda from ExtractInvoker in AnyInvocable to a separate functionAbseil Team2023-02-271-6/+9
| | | | | PiperOrigin-RevId: 512664112 Change-Id: I344fd425f52081c0662d7cd0ffa2eefd98fd18fe
* Replace ABSL_INTERNAL_UNREACHABLE with ABSL_UNREACHABLE()Derek Mauro2022-12-221-3/+4
| | | | | PiperOrigin-RevId: 497197704 Change-Id: I3865a874e04f6f55a1ab374b03451535a86bc5a3
* Detects accidental multiple invocations of ↵Abseil Team2022-10-111-2/+22
| | | | | | | 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
* Rename True alias.pateldeev2022-09-291-21/+21
|
* Release absl::AnyInvocableDino Radakovic2022-06-161-0/+857
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