diff options
author | Benjamin Barenblat <bbaren@google.com> | 2024-09-03 11:49:29 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2024-09-03 11:49:29 -0400 |
commit | c1afa8b8238c25591ca80d068477aa7d4ce05fc8 (patch) | |
tree | 284a9f8b319de5783ff83ad004a9e390cb60fd0d /absl/base/optimization.h | |
parent | 23778b53f420f54eebc195dd8430e79bda165e5b (diff) | |
parent | 4447c7562e3bc702ade25105912dce503f0c4010 (diff) | |
download | abseil-c1afa8b8238c25591ca80d068477aa7d4ce05fc8.tar.gz abseil-c1afa8b8238c25591ca80d068477aa7d4ce05fc8.tar.bz2 abseil-c1afa8b8238c25591ca80d068477aa7d4ce05fc8.zip |
Merge new upstream LTS 20240722.0
Diffstat (limited to 'absl/base/optimization.h')
-rw-r--r-- | absl/base/optimization.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/absl/base/optimization.h b/absl/base/optimization.h index f9859958..3aa66e1c 100644 --- a/absl/base/optimization.h +++ b/absl/base/optimization.h @@ -18,12 +18,23 @@ // ----------------------------------------------------------------------------- // // This header file defines portable macros for performance optimization. +// +// This header is included in both C++ code and legacy C code and thus must +// remain compatible with both C and C++. C compatibility will be removed if +// the legacy code is removed or converted to C++. Do not include this header in +// new code that requires C compatibility or assume C compatibility will remain +// indefinitely. #ifndef ABSL_BASE_OPTIMIZATION_H_ #define ABSL_BASE_OPTIMIZATION_H_ #include <assert.h> +#ifdef __cplusplus +// Included for std::unreachable() +#include <utility> +#endif // __cplusplus + #include "absl/base/config.h" #include "absl/base/options.h" |