Ensure __cpp_lib_bit_cast is defined when available by including <version>

PiperOrigin-RevId: 857265797
Change-Id: Ie3c6b466ffbc33406833b06bbec8a4f18433810b
This commit is contained in:
Abseil Team
2026-01-16 12:39:11 -08:00
committed by Copybara-Service
parent 28e6a799ba
commit ae164c5888

View File

@@ -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