diff options
Diffstat (limited to 'absl')
-rw-r--r-- | absl/functional/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/functional/CMakeLists.txt | 1 | ||||
-rw-r--r-- | absl/functional/function_ref.h | 4 |
3 files changed, 5 insertions, 1 deletions
diff --git a/absl/functional/BUILD.bazel b/absl/functional/BUILD.bazel index ebd9b99b..4555cd59 100644 --- a/absl/functional/BUILD.bazel +++ b/absl/functional/BUILD.bazel @@ -60,6 +60,7 @@ cc_library( linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ "//absl/base:base_internal", + "//absl/base:core_headers", "//absl/meta:type_traits", ], ) diff --git a/absl/functional/CMakeLists.txt b/absl/functional/CMakeLists.txt index 3919e9a1..338ddc6c 100644 --- a/absl/functional/CMakeLists.txt +++ b/absl/functional/CMakeLists.txt @@ -53,6 +53,7 @@ absl_cc_library( ${ABSL_DEFAULT_COPTS} DEPS absl::base_internal + absl::core_headers absl::meta PUBLIC ) diff --git a/absl/functional/function_ref.h b/absl/functional/function_ref.h index 5790a652..824e3cea 100644 --- a/absl/functional/function_ref.h +++ b/absl/functional/function_ref.h @@ -50,6 +50,7 @@ #include <functional> #include <type_traits> +#include "absl/base/attributes.h" #include "absl/functional/internal/function_ref.h" #include "absl/meta/type_traits.h" @@ -98,7 +99,8 @@ class FunctionRef<R(Args...)> { public: // Constructs a FunctionRef from any invokable type. template <typename F, typename = EnableIfCompatible<const F&>> - FunctionRef(const F& f) // NOLINT(runtime/explicit) + // NOLINTNEXTLINE(runtime/explicit) + FunctionRef(const F& f ABSL_ATTRIBUTE_LIFETIME_BOUND) : invoker_(&absl::functional_internal::InvokeObject<F, R, Args...>) { absl::functional_internal::AssertNonNull(f); ptr_.obj = &f; |