diff options
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" |