Skip to content

Conversation

@ZERICO2005
Copy link
Contributor

C++20 <version> provides macros to indicate which parts of libcxx are supported. For now, I have only defined the ones that should be fully supported

// c++14
__cpp_lib_exchange_function
__cpp_lib_integral_constant_callable
__cpp_lib_is_null_pointer
// c++17
__cpp_lib_as_const
__cpp_lib_bool_constant
__cpp_lib_logical_traits
__cpp_lib_void_t
// c++20
__cpp_lib_bit_cast
__cpp_lib_endian
__cpp_lib_math_constants

A few others are mostly complete such as __cpp_lib_transformation_trait_aliases and __cpp_lib_is_swappable

@ZERICO2005 ZERICO2005 changed the title C++20 <version> C++20 <version> and expanded <type_traits> Mar 6, 2025
@ZERICO2005
Copy link
Contributor Author

I have fixed this issue #534 by #ifdef'ing the three functions out. This allows the <type_traits> and <utility> header to compile without errors in C++11. However, std::swap and std::move are C++11 functions, so those may need a specific C++11 implementation.

@adriweb adriweb merged commit 91ee5a1 into master Mar 6, 2025
9 checks passed
@adriweb adriweb deleted the pr/cxx20_version branch March 6, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants