We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52ef3e3 commit 0acb422Copy full SHA for 0acb422
src/bsoncxx/include/bsoncxx/v1/detail/bit.hpp
@@ -19,10 +19,10 @@
19
#include <bsoncxx/v1/config/config.hpp>
20
21
#if defined(__has_include)
22
-#if __has_include(<bit>)
+#if __has_include(<bit>) && (!defined(_MSVC_LANG) || _MSVC_LANG >= 202002L)
23
// Prioritize using std::endian from C++20.
24
#include <bit>
25
-#endif // __has_include(<bit>)
+#endif // __has_include(<bit>) && (!defined(_MSVC_LANG) || _MSVC_LANG >= 202002L)
26
#elif defined(_WIN32)
27
// Forward-compatibility with STL: https://github.com/microsoft/STL/blob/vs-2019-16.5/stl/inc/bit#L26
28
#elif defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__)
0 commit comments