mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 20:14:23 +08:00
Ensure __cpp_lib_bit_cast is defined when available by including <version>
PiperOrigin-RevId: 857265797 Change-Id: Ie3c6b466ffbc33406833b06bbec8a4f18433810b
This commit is contained in:
committed by
Copybara-Service
parent
28e6a799ba
commit
ae164c5888
@@ -29,6 +29,12 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#ifdef __has_include
|
||||
#if __has_include(<version>)
|
||||
#include <version> // For __cpp_lib_bit_cast.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L
|
||||
#include <bit> // For std::bit_cast.
|
||||
#endif // defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L
|
||||
|
||||
Reference in New Issue
Block a user