aboutsummaryrefslogtreecommitdiff
path: root/absl/base/optimization.h
diff options
context:
space:
mode:
authorBenjamin Barenblat <bbaren@google.com>2024-09-03 11:49:29 -0400
committerBenjamin Barenblat <bbaren@google.com>2024-09-03 11:49:29 -0400
commitc1afa8b8238c25591ca80d068477aa7d4ce05fc8 (patch)
tree284a9f8b319de5783ff83ad004a9e390cb60fd0d /absl/base/optimization.h
parent23778b53f420f54eebc195dd8430e79bda165e5b (diff)
parent4447c7562e3bc702ade25105912dce503f0c4010 (diff)
downloadabseil-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.h11
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"