From a305e859b6d0abe6d88a3fe12c6891152cc6e859 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 24 Jun 2024 11:51:06 -0700 Subject: optimization.h: Add missing header for C++ PiperOrigin-RevId: 646172195 Change-Id: I089f1d84f2d73b663f12e6818f96436e054e71ae --- absl/base/optimization.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'absl') 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 +#ifdef __cplusplus +// Included for std::unreachable() +#include +#endif // __cplusplus + #include "absl/base/config.h" #include "absl/base/options.h" -- cgit v1.2.3