Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable __cpp_lib_concepts for EDG, part 1 #4296

Merged
merged 39 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
72de60e
Make `ranges::construct_at` call `std::construct_at` on EDG
cpplearner Oct 9, 2023
75fd274
VSO-1161828 DevCom-10156297 EDGcpfe/23297 REPORTED: EDG: wrong preced…
cpplearner Jan 3, 2024
94b23b8
VSO-1898880 EDGcpfe/26641 EDG fails to handle variable template speci…
cpplearner Jan 3, 2024
ae5116f
VSO-1898890 EDGcpfe/26576 EDG produces an error for conversion from a…
cpplearner Jan 3, 2024
22b1235
VSO-1898912 EDGcpfe/26535 EDG does not consider single_view<trivially…
cpplearner Jan 3, 2024
d1d6942
VSO-1898913 EDGcpfe/26534 Befriending an abbreviated function templat…
cpplearner Jan 3, 2024
d27b9be
VSO-1898915 EDGcpfe/23896 EDG produces a hard error for can_three_way…
cpplearner Jan 3, 2024
ee2f18b
VSO-1898929 EDGcpfe/25761 EDG rejects requires-clause in a definition…
cpplearner Jan 3, 2024
0f4a9a0
VSO-1898933 EDGcpfe/26745 EDG rejects parenthesized aggregate initial…
cpplearner Jan 3, 2024
70ecbd1
VSO-1898937 EDGcpfe/23985 EDG's __is_convertible_to depends on whethe…
cpplearner Jan 3, 2024
a269667
VSO-1898939 EDGcpfe/26746 EDG's __is_constructible has wrong value
cpplearner Jan 3, 2024
eb3f1b9
VSO-1898941 EDGcpfe/23985 EDG's default_initializable<const T> has wr…
cpplearner Jan 3, 2024
7067fd1
VSO-1898945 EDGcpfe/23985 EDG's default_initializable<AggregatesExpli…
cpplearner Jan 3, 2024
0564fb7
VSO-1898947 EDGcpfe/26747 EDG's std::nullptr_t has relational operato…
cpplearner Jan 3, 2024
6959375
VSO-1898962 EDGcpfe/26750 EDG constexpr dynamic allocations can't han…
cpplearner Jan 3, 2024
894549c
VSO-1900279 EDGcpfe/26763 EDG: Conditional explicit specifier is chec…
cpplearner Jan 3, 2024
de175b6
VSO-1900281 EDGcpfe/26539 EDG: Variable template is instantiated too …
cpplearner Jan 3, 2024
350387a
VSO-1900290 EDGcpfe/25760 EDG thinks a member does not exist in condi…
cpplearner Jan 3, 2024
082225b
VSO-1900293 EDGcpfe/26577 EDG rejects constrained alias template in a…
cpplearner Jan 3, 2024
743e9fa
VSO-1901430 EDGcpfe/26547 EDG rejects as_const_view with error: atomi…
cpplearner Jan 3, 2024
8753c4c
P0896R4_views_join: EDG ICE with constant-evaluating std::string in d…
cpplearner Jan 3, 2024
b4afb3a
P2322R6_ranges_alg_fold: EDG rejects constant-evaluating vector in de…
cpplearner Jan 3, 2024
ed64238
Make __cpp_lib_concepts not depend on __EDG__
cpplearner Jan 3, 2024
c2f695c
Uncomment `/BE` tests
cpplearner Jan 4, 2024
32f4220
Fix P0898R3_concepts
cpplearner Jan 4, 2024
70c6c8e
VSO-1900291 EDGcpfe/26751 EDG ICE involving pointer arithmetic
cpplearner Jan 5, 2024
07c08df
<ranges>: EDG mishandles a requires-clause that involves a local type…
cpplearner Jan 5, 2024
bc7e59d
Skip parts of ranges tests that seem to make EDG run forever
cpplearner Jan 5, 2024
65cfb73
VSO-1900294 EDGcpfe/26749 EDG: Constrained default constructor causes…
cpplearner Jan 6, 2024
9e9d1ee
Remove `(Clang)` and `(EDG)` from comments
cpplearner Jan 6, 2024
8bdc2c3
Merge branch 'main' into edg-concepts-1
cpplearner Jan 13, 2024
1ec9af8
Report EDG bug VSO-1948896
CaseyCarter Jan 30, 2024
688025a
Report EDG bug VSO-1949414
CaseyCarter Jan 31, 2024
f12c63a
Merge branch 'main' into edg-concepts-1
StephanTLavavej Jan 31, 2024
a8b9271
Work around VSO-1949451 "EDG concepts rejects std::expected trying to…
StephanTLavavej Jan 31, 2024
6b4e30b
Attempt to avoid timeouts in P0896R4_ranges_alg_find_end.
StephanTLavavej Feb 1, 2024
0409b66
Drop "assert bug so we'll notice when it's fixed".
StephanTLavavej Feb 1, 2024
1b4673f
Properly detect MSVC, part 1.
StephanTLavavej Feb 1, 2024
5850a46
Properly detect MSVC, part 2.
StephanTLavavej Feb 1, 2024
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
4 changes: 4 additions & 0 deletions stl/inc/memory
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,11 @@ namespace ranges {
noexcept(noexcept(::new (static_cast<void*>(_Location))
_Ty(_STD forward<_Types>(_Args)...))) /* strengthened */ {
// clang-format on
#ifdef __EDG__
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved
return _STD construct_at(_Location, _STD forward<_Types>(_Args)...);
#else // ^^^ EDG / Other vvv
_MSVC_CONSTEXPR return ::new (static_cast<void*>(_Location)) _Ty(_STD forward<_Types>(_Args)...);
#endif // ^^^ Other ^^^
}
};

Expand Down
10 changes: 9 additions & 1 deletion stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,17 @@ namespace ranges {
template <sized_range _Ty>
inline constexpr auto _Compile_time_max_size<_Ty> = (numeric_limits<range_size_t<_Ty>>::max)();

#ifdef __EDG__ // TRANSITION, VSO-1898880
template <class _Ty>
concept _Constant_sized_range = sized_range<_Ty> && requires { typename _Require_constant<_Ty::size()>; };

template <_Constant_sized_range _Ty>
inline constexpr auto _Compile_time_max_size<_Ty> = _Ty::size();
#else // ^^^ workaround / no workaround vvv
template <sized_range _Ty>
requires requires { typename _Require_constant<_Ty::size()>; }
inline constexpr auto _Compile_time_max_size<_Ty> = _Ty::size();
#endif // ^^^ no workaround ^^^

template <class _Ty, size_t _Size>
inline constexpr auto _Compile_time_max_size<_Ty[_Size]> = _Size;
Expand Down Expand Up @@ -9768,7 +9776,7 @@ namespace ranges {
template <class _Rng>
_NODISCARD consteval int _Cartesian_product_max_size_bit_width() {
using _Size_type = decltype(_Compile_time_max_size<_Rng>);
if constexpr (requires(_Size_type _Val) { _STD bit_width(_Val); }) {
if constexpr (requires { _STD bit_width(_Compile_time_max_size<_Rng>); }) {
return _STD bit_width(_Compile_time_max_size<_Rng>);
} else {
return numeric_limits<_Size_type>::digits;
Expand Down
8 changes: 4 additions & 4 deletions stl/inc/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ template <class... _Types, class _Other, size_t... _Indices>
inline constexpr bool _Can_construct_values_from_tuple_like_v<tuple<_Types...>, _Other, index_sequence<_Indices...>> =
conjunction_v<is_constructible<_Types, decltype(_STD get<_Indices>(_STD declval<_Other>()))>...>;

#ifdef __clang__ // TRANSITION, LLVM-59827
#if defined(__clang__) || defined(__EDG__) // TRANSITION, LLVM-59827 and VSO-1900279
template <class _TupleLike, class _Tuple>
concept _Can_construct_from_tuple_like =
_Different_from<_TupleLike, _Tuple> && _Tuple_like<_TupleLike> && !_Is_subrange_v<remove_cvref_t<_TupleLike>>
Expand All @@ -195,7 +195,7 @@ concept _Can_construct_from_tuple_like =
&& (tuple_size_v<_Tuple> != 1
|| (!is_convertible_v<_TupleLike, tuple_element_t<0, _Tuple>>
&& !is_constructible_v<tuple_element_t<0, _Tuple>, _TupleLike>) );
#endif // defined(__clang__)
#endif // defined(__clang__) || defined(__EDG__)

template <class _TTuple, class _UTuple, class _Indices = make_index_sequence<tuple_size_v<_UTuple>>>
struct _Three_way_comparison_result_with_tuple_like {};
Expand Down Expand Up @@ -432,7 +432,7 @@ public:
negation_v<conjunction<is_convertible<decltype(_STD get<0>(_STD declval<_Other>())), _This>,
is_convertible<decltype(_STD get<_Indices + 1>(_STD declval<_Other>())), _Rest>...>>;

#ifdef __clang__ // TRANSITION, LLVM-59827
#if defined(__clang__) || defined(__EDG__) // TRANSITION, LLVM-59827 and VSO-1900279
template <class _Other, enable_if_t<_Can_construct_from_tuple_like<_Other, tuple>, int> = 0>
#else // ^^^ workaround / no workaround vvv
template <_Different_from<tuple> _Other>
Expand Down Expand Up @@ -540,7 +540,7 @@ public:
: tuple(_Alloc_unpack_tuple_t{}, _Al, _STD move(_Right)) {}

#ifdef __cpp_lib_concepts
#ifdef __clang__ // TRANSITION, LLVM-59827
#if defined(__clang__) || defined(__EDG__) // TRANSITION, LLVM-59827 and VSO-1900279
template <class _Alloc, class _Other, enable_if_t<_Can_construct_from_tuple_like<_Other, tuple>, int> = 0>
#else // ^^^ workaround / no workaround vvv
template <class _Alloc, _Different_from<tuple> _Other>
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/utility
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ concept _Tuple_like = _Tuple_like_impl<remove_cvref_t<_Ty>>;
template <class _Ty>
concept _Pair_like = _Tuple_like<_Ty> && tuple_size_v<remove_cvref_t<_Ty>> == 2;

#ifdef __clang__ // TRANSITION, LLVM-59827
#if defined(__clang__) || defined(__EDG__) // TRANSITION, LLVM-59827 and VSO-1900279
template <class _PairLike, class _Ty1, class _Ty2>
concept _Can_construct_from_pair_like = _Pair_like<_PairLike> && !_Is_subrange_v<remove_cvref_t<_PairLike>>
&& is_constructible_v<_Ty1, decltype(_STD get<0>(_STD declval<_PairLike>()))>
&& is_constructible_v<_Ty2, decltype(_STD get<1>(_STD declval<_PairLike>()))>;
#endif // defined(__clang__)
#endif // defined(__clang__) || defined(__EDG__)
#endif // _HAS_CXX23
#endif // defined(__cpp_lib_concepts)

Expand Down Expand Up @@ -289,7 +289,7 @@ struct pair { // store a pair of values
: first(_STD forward<const _Other1>(_Right.first)), second(_STD forward<const _Other2>(_Right.second)) {}

#ifdef __cpp_lib_concepts
#ifdef __clang__ // TRANSITION, LLVM-59827
#if defined(__clang__) || defined(__EDG__) // TRANSITION, LLVM-59827 and VSO-1900279
template <class _Other, enable_if_t<_Can_construct_from_pair_like<_Other, _Ty1, _Ty2>, int> = 0>
#else // ^^^ workaround / no workaround vvv
template <_Pair_like _Other>
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -3972,6 +3972,9 @@ struct _Move_iterator_category {

_EXPORT_STD template <class _Iter>
class move_iterator : public _Move_iterator_category<_Iter> {
private:
_Iter _Current{};

public:
using iterator_type = _Iter;
using value_type = _Iter_value_t<_Iter>;
Expand Down Expand Up @@ -4211,9 +4214,6 @@ public:
_NODISCARD constexpr iterator_type&& _Get_current() && noexcept {
return _STD move(_Current);
}

private:
iterator_type _Current{};
};

_EXPORT_STD template <class _Iter1, class _Iter2>
Expand Down
212 changes: 87 additions & 125 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1716,62 +1716,43 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#endif // defined(__cpp_impl_coroutine)

#if _HAS_CXX20
#if !defined(__EDG__) || defined(__INTELLISENSE__) // TRANSITION, GH-395
#if _HAS_CXX23 // TRANSITION, GH-395 - move down to "macros with language mode sensitivity" section
#define __cpp_lib_concepts 202207L // P2404R3 Move-Only Types For Comparison Concepts
#else // ^^^ C++23 / C++20 vvv
#define __cpp_lib_concepts 202002L // P1964R2 Replacing boolean With boolean-testable
#endif // C++20
#endif // !defined(__EDG__) || defined(__INTELLISENSE__)

#ifdef __cpp_lib_concepts
#define __cpp_lib_algorithm_iterator_requirements 202207L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_assume_aligned 201811L
#define __cpp_lib_atomic_flag_test 201907L
#define __cpp_lib_atomic_float 201711L
#define __cpp_lib_atomic_lock_free_type_aliases 201907L
#define __cpp_lib_atomic_ref 201806L
#define __cpp_lib_atomic_shared_ptr 201711L
#define __cpp_lib_atomic_wait 201907L
#define __cpp_lib_barrier 202302L
#define __cpp_lib_bind_front 201907L
#define __cpp_lib_bit_cast 201806L
#define __cpp_lib_bitops 201907L
#define __cpp_lib_bounded_array_traits 201902L

#ifdef __cpp_lib_concepts
#define __cpp_lib_common_reference 202302L
#define __cpp_lib_common_reference_wrapper 202302L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_constexpr_algorithms 201806L
#define __cpp_lib_constexpr_complex 201711L
#define __cpp_lib_constexpr_dynamic_alloc 201907L
#define __cpp_lib_constexpr_functional 201907L
#define __cpp_lib_constexpr_iterator 201811L
#define __cpp_lib_constexpr_numeric 201911L
#define __cpp_lib_constexpr_string 201907L
#define __cpp_lib_constexpr_string_view 201811L
#define __cpp_lib_constexpr_tuple 201811L
#define __cpp_lib_constexpr_utility 201811L
#define __cpp_lib_constexpr_vector 201907L
#define __cpp_lib_destroying_delete 201806L
#define __cpp_lib_endian 201907L
#define __cpp_lib_erase_if 202002L

#ifdef __cpp_lib_concepts
#define __cpp_lib_format 202304L
#define __cpp_lib_format_uchar 202311L
#define __cpp_lib_freestanding_ranges 202306L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_generic_unordered_lookup 201811L
#define __cpp_lib_int_pow2 202002L
#define __cpp_lib_integer_comparison_functions 202002L
#define __cpp_lib_interpolate 201902L
#define __cpp_lib_is_constant_evaluated 201811L
#define __cpp_lib_assume_aligned 201811L
#define __cpp_lib_atomic_flag_test 201907L
#define __cpp_lib_atomic_float 201711L
#define __cpp_lib_atomic_lock_free_type_aliases 201907L
#define __cpp_lib_atomic_ref 201806L
#define __cpp_lib_atomic_shared_ptr 201711L
#define __cpp_lib_atomic_wait 201907L
#define __cpp_lib_barrier 202302L
#define __cpp_lib_bind_front 201907L
#define __cpp_lib_bit_cast 201806L
#define __cpp_lib_bitops 201907L
#define __cpp_lib_bounded_array_traits 201902L
#define __cpp_lib_common_reference 202302L
#define __cpp_lib_common_reference_wrapper 202302L
#define __cpp_lib_constexpr_algorithms 201806L
#define __cpp_lib_constexpr_complex 201711L
#define __cpp_lib_constexpr_dynamic_alloc 201907L
#define __cpp_lib_constexpr_functional 201907L
#define __cpp_lib_constexpr_iterator 201811L
#define __cpp_lib_constexpr_numeric 201911L
#define __cpp_lib_constexpr_string 201907L
#define __cpp_lib_constexpr_string_view 201811L
#define __cpp_lib_constexpr_tuple 201811L
#define __cpp_lib_constexpr_utility 201811L
#define __cpp_lib_constexpr_vector 201907L
#define __cpp_lib_destroying_delete 201806L
#define __cpp_lib_endian 201907L
#define __cpp_lib_erase_if 202002L
#define __cpp_lib_format 202304L
#define __cpp_lib_format_uchar 202311L
#define __cpp_lib_freestanding_ranges 202306L
#define __cpp_lib_generic_unordered_lookup 201811L
#define __cpp_lib_int_pow2 202002L
#define __cpp_lib_integer_comparison_functions 202002L
#define __cpp_lib_interpolate 201902L
#define __cpp_lib_is_constant_evaluated 201811L

#ifndef __clang__ // TRANSITION, LLVM-48860
#define __cpp_lib_is_layout_compatible 201907L
Expand All @@ -1792,10 +1773,7 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_modules 202207L
#endif // !defined(__clang__) && !defined(__EDG__)

#ifdef __cpp_lib_concepts
#define __cpp_lib_move_iterator_concept 202207L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_move_iterator_concept 202207L
#define __cpp_lib_polymorphic_allocator 201902L
#define __cpp_lib_remove_cvref 201711L
#define __cpp_lib_semaphore 201907L
Expand All @@ -1805,15 +1783,11 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_ssize 201902L
#define __cpp_lib_starts_ends_with 201711L
#define __cpp_lib_syncbuf 201803L

#ifdef __cpp_lib_concepts
#define __cpp_lib_three_way_comparison 201907L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_to_address 201711L
#define __cpp_lib_to_array 201907L
#define __cpp_lib_type_identity 201806L
#define __cpp_lib_unwrap_ref 201811L
#define __cpp_lib_three_way_comparison 201907L
#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

// C++23
Expand All @@ -1826,58 +1800,42 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_constexpr_bitset 202207L
#define __cpp_lib_constexpr_charconv 202207L
#define __cpp_lib_constexpr_typeinfo 202106L

#ifdef __cpp_lib_concepts
#define __cpp_lib_containers_ranges 202202L
#define __cpp_lib_expected 202211L
#define __cpp_lib_formatters 202302L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_forward_like 202207L
#define __cpp_lib_invoke_r 202106L
#define __cpp_lib_ios_noreplace 202207L
#define __cpp_lib_is_scoped_enum 202011L

#ifdef __cpp_lib_concepts
#define __cpp_lib_mdspan 202207L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_move_only_function 202110L

#ifdef __cpp_lib_concepts
#define __cpp_lib_out_ptr 202106L
#define __cpp_lib_print 202207L
#define __cpp_lib_ranges_as_const 202311L
#define __cpp_lib_ranges_as_rvalue 202207L
#define __cpp_lib_ranges_cartesian_product 202207L
#define __cpp_lib_ranges_chunk 202202L
#define __cpp_lib_ranges_chunk_by 202202L
#define __cpp_lib_ranges_contains 202207L
#define __cpp_lib_ranges_enumerate 202302L
#define __cpp_lib_ranges_find_last 202207L
#define __cpp_lib_ranges_fold 202207L
#define __cpp_lib_ranges_iota 202202L
#define __cpp_lib_ranges_join_with 202202L
#define __cpp_lib_ranges_repeat 202207L
#define __cpp_lib_ranges_slide 202202L
#define __cpp_lib_ranges_starts_ends_with 202106L
#define __cpp_lib_ranges_stride 202207L
#define __cpp_lib_ranges_to_container 202202L
#define __cpp_lib_ranges_zip 202110L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_spanstream 202106L
#define __cpp_lib_stacktrace 202011L
#define __cpp_lib_stdatomic_h 202011L
#define __cpp_lib_string_contains 202011L
#define __cpp_lib_string_resize_and_overwrite 202110L
#define __cpp_lib_to_underlying 202102L

#ifdef __cpp_lib_concepts
#define __cpp_lib_tuple_like 202207L
#endif // defined(__cpp_lib_concepts)

#define __cpp_lib_unreachable 202202L
#define __cpp_lib_containers_ranges 202202L
#define __cpp_lib_expected 202211L
#define __cpp_lib_formatters 202302L
#define __cpp_lib_forward_like 202207L
#define __cpp_lib_invoke_r 202106L
#define __cpp_lib_ios_noreplace 202207L
#define __cpp_lib_is_scoped_enum 202011L
#define __cpp_lib_mdspan 202207L
#define __cpp_lib_move_only_function 202110L
#define __cpp_lib_out_ptr 202106L
#define __cpp_lib_print 202207L
#define __cpp_lib_ranges_as_const 202311L
#define __cpp_lib_ranges_as_rvalue 202207L
#define __cpp_lib_ranges_cartesian_product 202207L
#define __cpp_lib_ranges_chunk 202202L
#define __cpp_lib_ranges_chunk_by 202202L
#define __cpp_lib_ranges_contains 202207L
#define __cpp_lib_ranges_enumerate 202302L
#define __cpp_lib_ranges_find_last 202207L
#define __cpp_lib_ranges_fold 202207L
#define __cpp_lib_ranges_iota 202202L
#define __cpp_lib_ranges_join_with 202202L
#define __cpp_lib_ranges_repeat 202207L
#define __cpp_lib_ranges_slide 202202L
#define __cpp_lib_ranges_starts_ends_with 202106L
#define __cpp_lib_ranges_stride 202207L
#define __cpp_lib_ranges_to_container 202202L
#define __cpp_lib_ranges_zip 202110L
#define __cpp_lib_spanstream 202106L
#define __cpp_lib_stacktrace 202011L
#define __cpp_lib_stdatomic_h 202011L
#define __cpp_lib_string_contains 202011L
#define __cpp_lib_string_resize_and_overwrite 202110L
#define __cpp_lib_to_underlying 202102L
#define __cpp_lib_tuple_like 202207L
#define __cpp_lib_unreachable 202202L
#endif // _HAS_CXX23

// macros with language mode sensitivity
Expand All @@ -1887,14 +1845,20 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_array_constexpr 201803L // P0858R0 Constexpr Iterator Requirements
#endif // _HAS_CXX17

#ifdef __cpp_lib_concepts
#if _HAS_CXX20
#define __cpp_lib_chrono 201907L // P1466R3 Miscellaneous Minor Fixes For <chrono>
#elif _HAS_CXX17
#define __cpp_lib_chrono 201611L // P0505R0 constexpr For <chrono> (Again)
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
#define __cpp_lib_chrono 201510L // P0092R1 <chrono> floor(), ceil(), round(), abs()
#endif // ^^^ !_HAS_CXX17 ^^^

#if _HAS_CXX23
#define __cpp_lib_concepts 202207L // P2404R3 Move-Only Types For Comparison Concepts
#elif _HAS_CXX20 // ^^^ C++23 / C++20 vvv
#define __cpp_lib_concepts 202002L // P1964R2 Replacing boolean With boolean-testable
#endif // C++20

#if _HAS_CXX23
#define __cpp_lib_constexpr_memory 202202L // P2273R3 constexpr unique_ptr
#elif _HAS_CXX20
Expand All @@ -1909,29 +1873,27 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#endif // language mode
#endif // !defined(_M_CEE_PURE)

#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#if _HAS_CXX23
#define __cpp_lib_optional 202110L // P0798R8 Monadic Operations For optional
#elif _HAS_CXX20 // ^^^ _HAS_CXX23 / _HAS_CXX20 vvv
#define __cpp_lib_optional 202106L // P2231R1 Completing constexpr In optional And variant
#elif _HAS_CXX17 // ^^^ _HAS_CXX20 / _HAS_CXX17 vvv
#define __cpp_lib_optional 201606L // P0307R2 Making Optional Greater Equal Again
#endif // _HAS_CXX17

#if defined(__cpp_lib_concepts) // TRANSITION, GH-395
#if _HAS_CXX23
#define __cpp_lib_ranges 202302L // P2609R3 Relaxing Ranges Just A Smidge
#elif _HAS_CXX20 // ^^^ _HAS_CXX23 / _HAS_CXX20 vvv
#define __cpp_lib_ranges 202110L // P2415R2 What Is A view?
#endif // _HAS_CXX20
#endif // defined(__cpp_lib_concepts)

#if _HAS_CXX20
#define __cpp_lib_shared_ptr_arrays 201707L // P0674R1 make_shared() For Arrays
#else
#define __cpp_lib_shared_ptr_arrays 201611L // P0497R0 Fixing shared_ptr For Arrays
#endif

#if _HAS_CXX23 && defined(__cpp_lib_concepts) // TRANSITION, GH-395
#if _HAS_CXX23
#define __cpp_lib_shift 202202L // P2440R1 ranges::shift_left, ranges::shift_right
#elif _HAS_CXX20 // ^^^ _HAS_CXX23 / _HAS_CXX20 vvv
#define __cpp_lib_shift 201806L // P0769R2 shift_left(), shift_right()
Expand Down
Loading