summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorGravatar Dino Radakovic <dinor@google.com>2024-05-08 20:58:59 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2024-05-08 20:59:54 -0700
commit1f6c241cb62eec9450895450aafae8fe2c265c3d (patch)
tree3ece55749a1831cfe5c46fe669ddb4e840688b8e /absl
parent7b87d959346cab4ab9829724efee377f7fb254ed (diff)
`any_invocable`: Clean up #includes
- 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
Diffstat (limited to 'absl')
-rw-r--r--absl/functional/any_invocable.h1
-rw-r--r--absl/functional/internal/any_invocable.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/absl/functional/any_invocable.h b/absl/functional/any_invocable.h
index bc980731..3acb9fd0 100644
--- a/absl/functional/any_invocable.h
+++ b/absl/functional/any_invocable.h
@@ -34,6 +34,7 @@
#define ABSL_FUNCTIONAL_ANY_INVOCABLE_H_
#include <cstddef>
+#include <functional>
#include <initializer_list>
#include <type_traits>
#include <utility>
diff --git a/absl/functional/internal/any_invocable.h b/absl/functional/internal/any_invocable.h
index ce58fd8c..c2d8cd47 100644
--- a/absl/functional/internal/any_invocable.h
+++ b/absl/functional/internal/any_invocable.h
@@ -58,12 +58,12 @@
#include <cstring>
#include <exception>
#include <functional>
-#include <initializer_list>
#include <memory>
#include <new>
#include <type_traits>
#include <utility>
+#include "absl/base/attributes.h"
#include "absl/base/config.h"
#include "absl/base/internal/invoke.h"
#include "absl/base/macros.h"