Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1089,12 +1089,10 @@
#define __cpp_lib_bit_cast 201806L
#endif // __EDG__

#if defined(__clang__) || defined(__EDG__)
#define __cpp_lib_bitops 201907L
#else // ^^^ Clang and EDG / MSVC vvv
#ifdef __clang__ // TRANSITION, VSO-1020212
// a future MSVC update will embed CPU feature detection into <bit> intrinsics
// TRANSITION, VSO-1020212
#endif // defined(__clang__) || defined(__EDG__)
#define __cpp_lib_bitops 201907L
#endif // __clang__

#define __cpp_lib_bounded_array_traits 201902L

Expand All @@ -1112,20 +1110,24 @@
#define __cpp_lib_endian 201907L
#define __cpp_lib_erase_if 202002L
#define __cpp_lib_generic_unordered_lookup 201811L
#define __cpp_lib_int_pow2 202002L
#define __cpp_lib_is_constant_evaluated 201811L
#define __cpp_lib_is_nothrow_convertible 201806L
#define __cpp_lib_list_remove_return_type 201806L
#define __cpp_lib_math_constants 201907L
#define __cpp_lib_remove_cvref 201711L
#define __cpp_lib_shift 201806L
#define __cpp_lib_span 202002L
#define __cpp_lib_ssize 201902L
#define __cpp_lib_starts_ends_with 201711L
#define __cpp_lib_to_address 201711L
#define __cpp_lib_to_array 201907L
#define __cpp_lib_type_identity 201806L
#define __cpp_lib_unwrap_ref 201811L

#ifdef __cpp_lib_bitops // TRANSITION, VSO-1020212
#define __cpp_lib_int_pow2 202002L
#endif
Comment on lines +1114 to +1116
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I observe that <bit> guards its non-bit_cast content with #ifdef __cpp_lib_bitops // TRANSITION, VSO-1020212 instead of having separate sections for that and __cpp_lib_int_pow2. This is fine, but I thought I'd mention it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I wrote the guard before __cpp_lib_int_pow2 was a thing.


#define __cpp_lib_is_constant_evaluated 201811L
#define __cpp_lib_is_nothrow_convertible 201806L
#define __cpp_lib_list_remove_return_type 201806L
#define __cpp_lib_math_constants 201907L
#define __cpp_lib_remove_cvref 201711L
#define __cpp_lib_shift 201806L
#define __cpp_lib_span 202002L
#define __cpp_lib_ssize 201902L
#define __cpp_lib_starts_ends_with 201711L
#define __cpp_lib_to_address 201711L
#define __cpp_lib_to_array 201907L
#define __cpp_lib_type_identity 201806L
#define __cpp_lib_unwrap_ref 201811L
#endif // _HAS_CXX20

#if _HAS_CXX20
Expand Down
4 changes: 2 additions & 2 deletions tests/std/tests/VSO_0157762_feature_test_macros/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ STATIC_ASSERT(__cpp_lib_bit_cast == 201806L);
#endif
#endif

#if _HAS_CXX20 && (defined(__clang__) || defined(__EDG__)) // TRANSITION, VSO-1020212
#if _HAS_CXX20 && defined(__clang__) // TRANSITION, VSO-1020212
#ifndef __cpp_lib_bitops
#error __cpp_lib_bitops is not defined
#elif __cpp_lib_bitops != 201907L
Expand Down Expand Up @@ -1166,7 +1166,7 @@ STATIC_ASSERT(__cpp_lib_hypot == 201603L);
STATIC_ASSERT(__cpp_lib_incomplete_container_elements == 201505L);
#endif

#if _HAS_CXX20
#if _HAS_CXX20 && defined(__clang__) // TRANSITION, VSO-1020212
#ifndef __cpp_lib_int_pow2
#error __cpp_lib_int_pow2 is not defined
#elif __cpp_lib_int_pow2 != 202002L
Expand Down