From d859fafe1ab9edc9c04ca262d9993be82c757881 Mon Sep 17 00:00:00 2001 From: Evan Brown Date: Tue, 20 Sep 2022 13:12:25 -0700 Subject: Change the macro ABSL_IS_TRIVIALLY_RELOCATABLE into a type trait - absl::is_trivially_relocatable - and move it from optimization.h to type_traits.h. Example of how to change to the new type trait: ``` #include "absl/base/attributes.h" if (ABSL_IS_TRIVIALLY_RELOCATABLE(T)) { DoSomething(); } ``` to ``` #include "absl/meta/type_traits.h" if (absl::is_trivially_relocatable::value) { DoSomething(); } ``` Note that optimization.h is also built in C mode so we can't put a type trait there. PiperOrigin-RevId: 475633715 Change-Id: I2bc85f3f6711d1280049fd01eb97c497d2d0d929 --- absl/meta/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'absl/meta/CMakeLists.txt') diff --git a/absl/meta/CMakeLists.txt b/absl/meta/CMakeLists.txt index 9de4bd37..f16f17bd 100644 --- a/absl/meta/CMakeLists.txt +++ b/absl/meta/CMakeLists.txt @@ -34,6 +34,7 @@ absl_cc_test( COPTS ${ABSL_TEST_COPTS} DEPS + absl::core_headers absl::type_traits GTest::gmock_main ) -- cgit v1.2.3