diff --git a/stl/inc/ranges b/stl/inc/ranges index cc5c841ba9..c2013431f3 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -2340,11 +2340,6 @@ namespace ranges { _EXPORT_STD inline constexpr _Filter_fn filter; } // namespace views -#ifdef __clang__ - template // TRANSITION, LLVM-47414 - concept _Can_const_transform = range && regular_invocable>; -#endif // ^^^ workaround ^^^ - _EXPORT_STD template requires view<_Vw> && regular_invocable<_Fn&, range_reference_t<_Vw>> && _Can_reference>> @@ -2708,11 +2703,7 @@ namespace ranges { _NODISCARD constexpr _Iterator begin() const noexcept( noexcept(_RANGES begin(_Range)) && is_nothrow_move_constructible_v>) /* strengthened */ -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Can_const_transform<_Vw, _Fn> -#else // ^^^ workaround / no workaround vvv requires range && regular_invocable> -#endif // TRANSITION, LLVM-47414 { return _Iterator{*this, _RANGES begin(_Range)}; } @@ -2731,11 +2722,7 @@ namespace ranges { // clang-format off _NODISCARD constexpr auto end() const noexcept(noexcept( _RANGES end(_Range)) && is_nothrow_move_constructible_v) /* strengthened */ -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Can_const_transform<_Vw, _Fn> -#else // ^^^ workaround / no workaround vvv requires range && regular_invocable> -#endif // TRANSITION, LLVM-47414 { // clang-format on if constexpr (common_range<_Vw>) { @@ -3070,11 +3057,6 @@ namespace ranges { _EXPORT_STD inline constexpr _Take_fn take; } // namespace views -#ifdef __clang__ - template // TRANSITION, LLVM-47414 - concept _Can_take_while_const = range && indirect_unary_predicate>; -#endif // ^^^ workaround ^^^ - _EXPORT_STD template requires input_range<_Vw> && is_object_v<_Pr> && indirect_unary_predicate> class take_while_view : public view_interface> { @@ -3190,11 +3172,7 @@ namespace ranges { } _NODISCARD constexpr auto begin() const noexcept(noexcept(_RANGES begin(_Range))) /* strengthened */ -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Can_take_while_const<_Vw, _Pr> -#else // ^^^ workaround / no workaround vvv requires range && indirect_unary_predicate> -#endif // TRANSITION, LLVM-47414 { return _RANGES begin(_Range); } @@ -3211,11 +3189,7 @@ namespace ranges { _NODISCARD constexpr auto end() const noexcept( noexcept(_RANGES end(_Range)) && is_nothrow_move_constructible_v<_Sentinel>) /* strengthened */ -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Can_take_while_const<_Vw, _Pr> -#else // ^^^ workaround / no workaround vvv requires range && indirect_unary_predicate> -#endif // TRANSITION, LLVM-47414 { #if _CONTAINER_DEBUG_LEVEL > 0 _STL_VERIFY(_Pred, "cannot call end on a take_while_view with no predicate"); @@ -3562,12 +3536,6 @@ namespace ranges { _EXPORT_STD inline constexpr _Drop_while_fn drop_while; } // namespace views -#ifdef __clang__ - template // TRANSITION, LLVM-47414 - concept _Can_const_join = forward_range && is_reference_v> - && input_range>; -#endif // ^^^ workaround ^^^ - template _NODISCARD constexpr _Ty& _As_lvalue(_Ty&& _Val) noexcept { return static_cast<_Ty&>(_Val); @@ -3934,11 +3902,7 @@ namespace ranges { } _NODISCARD constexpr _Iterator begin() const -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Can_const_join<_Vw> -#else // ^^^ workaround / no workaround vvv requires forward_range && is_reference_v<_InnerRng> && input_range<_InnerRng> -#endif // TRANSITION, LLVM-47414 { return _Iterator{*this, _RANGES begin(_Range)}; } @@ -3953,11 +3917,7 @@ namespace ranges { } _NODISCARD constexpr auto end() const -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Can_const_join<_Vw> -#else // ^^^ workaround / no workaround vvv requires forward_range && is_reference_v<_InnerRng> && input_range<_InnerRng> -#endif // TRANSITION, LLVM-47414 { if constexpr (forward_range<_InnerRng> && common_range && common_range<_InnerRng>) { return _Iterator{*this, _RANGES end(_Range)}; @@ -3994,13 +3954,6 @@ namespace ranges { && common_reference_with, range_reference_t<_Pat>> && common_reference_with, range_rvalue_reference_t<_Pat>>; -#ifdef __clang__ - template // TRANSITION, LLVM-47414 - concept _Can_const_join_with = - forward_range && forward_range && is_reference_v> - && input_range>; -#endif // ^^^ workaround ^^^ - _EXPORT_STD template requires view<_Vw> && input_range> && view<_Pat> && _Compatible_joinable_ranges, _Pat> @@ -4450,12 +4403,8 @@ namespace ranges { } _NODISCARD constexpr auto begin() const -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Can_const_join_with<_Vw, _Pat> -#else // ^^^ workaround / no workaround vvv requires forward_range && forward_range && is_reference_v<_InnerRng> && input_range<_InnerRng> -#endif // TRANSITION, LLVM-47414 { return _Iterator{*this, _RANGES begin(_Range)}; } @@ -4472,12 +4421,8 @@ namespace ranges { } _NODISCARD constexpr auto end() const -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Can_const_join_with<_Vw, _Pat> -#else // ^^^ workaround / no workaround vvv requires forward_range && forward_range && is_reference_v<_InnerRng> && input_range<_InnerRng> -#endif // TRANSITION, LLVM-47414 { if constexpr (forward_range<_InnerRng> && common_range<_Vw> && common_range<_InnerRng>) { return _Iterator{*this, _RANGES end(_Range)}; @@ -8013,16 +7958,6 @@ namespace ranges { return _Evaluate_equality_closure(index_sequence_for<_LHSTupleTypes...>{}); } -#ifdef __clang__ - template // TRANSITION, LLVM-47414 - concept _Zip_iter_converts = - _IsConst && (convertible_to, iterator_t> && ...); - - template // TRANSITION, LLVM-47414 - concept _Zip_sent_converts = - _IsConst && (convertible_to, sentinel_t> && ...); -#endif // ^^^ workaround ^^^ - template concept _Zip_transform_constraints = move_constructible<_Func> && is_object_v<_Func> && (sizeof...(_Views) > 0) && (input_range<_Views> && ...) @@ -8074,13 +8009,8 @@ namespace ranges { constexpr _Iterator(_Iterator _Rhs) noexcept( (is_nothrow_convertible_v, iterator_t> && ...)) // strengthened -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Zip_iter_converts<_IsConst, _ViewTypes...> -#else // ^^^ workaround / no workaround vvv requires (_IsConst && (convertible_to, iterator_t> && ...)) -#endif // __clang__ - : _Current(_STD move(_Rhs._Current)) { - } + : _Current(_STD move(_Rhs._Current)) {} _NODISCARD constexpr auto operator*() const noexcept((noexcept(*(_STD declval>&>())) @@ -8285,13 +8215,8 @@ namespace ranges { constexpr _Sentinel(_Sentinel _Rhs) noexcept( (is_nothrow_convertible_v, sentinel_t> && ...)) // strengthened -#ifdef __clang__ // TRANSITION, LLVM-47414 - requires _Zip_sent_converts<_IsConst, _ViewTypes...> -#else // ^^^ workaround / no workaround vvv requires (_IsConst && (convertible_to, sentinel_t> && ...)) -#endif // __clang__ - : _End(_STD move(_Rhs._End)) { - } + : _End(_STD move(_Rhs._End)) {} template requires (sentinel_for>, diff --git a/stl/inc/xutility b/stl/inc/xutility index 82888aab50..b66c5180f0 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -1975,10 +1975,8 @@ struct _Const_sentinel<_Sent> { _EXPORT_STD template using const_sentinel = typename _Const_sentinel<_Sent>::type; -// clang-format off template concept _Not_a_const_iterator = !_Is_specialization_v<_Ty, basic_const_iterator>; -// clang-format on template struct _Basic_const_iterator_category {}; @@ -1988,18 +1986,6 @@ struct _Basic_const_iterator_category<_Iter> { using iterator_category = typename iterator_traits<_Iter>::iterator_category; }; -// TRANSITION, LLVM-55945: These are distinct concepts as a workaround -template -concept _Bci_order = _Different_from<_Ty, basic_const_iterator<_Iter>> && random_access_iterator<_Iter> - && totally_ordered_with<_Iter, _Ty>; - -template -concept _Bci_order_3way = _Bci_order<_Ty, _Iter> && three_way_comparable_with<_Iter, _Ty>; - -template -concept _Not_bci_order = - _Not_a_const_iterator<_Ty> && random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Ty>; - _EXPORT_STD template class basic_const_iterator : public _Basic_const_iterator_category<_Iter> { private: @@ -2168,55 +2154,65 @@ public: return _Current <=> _Right._Current; } - template <_Bci_order<_Iter> _Other> + template <_Different_from _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> _NODISCARD constexpr bool operator<(const _Other& _Right) const noexcept(noexcept(_Fake_copy_init(_Current < _Right))) /* strengthened */ { return _Current < _Right; } - template <_Bci_order<_Iter> _Other> + template <_Different_from _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> _NODISCARD constexpr bool operator>(const _Other& _Right) const noexcept(noexcept(_Fake_copy_init(_Current > _Right))) /* strengthened */ { return _Current > _Right; } - template <_Bci_order<_Iter> _Other> + template <_Different_from _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> _NODISCARD constexpr bool operator<=(const _Other& _Right) const noexcept(noexcept(_Fake_copy_init(_Current <= _Right))) /* strengthened */ { return _Current <= _Right; } - template <_Bci_order<_Iter> _Other> + template <_Different_from _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> _NODISCARD constexpr bool operator>=(const _Other& _Right) const noexcept(noexcept(_Fake_copy_init(_Current >= _Right))) /* strengthened */ { return _Current >= _Right; } - template <_Bci_order_3way<_Iter> _Other> + template <_Different_from _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> + && three_way_comparable_with<_Iter, _Other> _NODISCARD constexpr auto operator<=>(const _Other& _Right) const noexcept(noexcept(_Current <=> _Right)) /* strengthened */ { return _Current <=> _Right; } - template <_Not_bci_order<_Iter> _Other> + template <_Not_a_const_iterator _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> _NODISCARD_FRIEND constexpr bool operator<(const _Other& _Left, const basic_const_iterator& _Right) noexcept( noexcept(_Fake_copy_init(_Left < _Right._Current))) /* strengthened */ { return _Left < _Right._Current; } - template <_Not_bci_order<_Iter> _Other> + template <_Not_a_const_iterator _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> _NODISCARD_FRIEND constexpr bool operator>(const _Other& _Left, const basic_const_iterator& _Right) noexcept( noexcept(_Fake_copy_init(_Left > _Right._Current))) /* strengthened */ { return _Left > _Right._Current; } - template <_Not_bci_order<_Iter> _Other> + template <_Not_a_const_iterator _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> _NODISCARD_FRIEND constexpr bool operator<=(const _Other& _Left, const basic_const_iterator& _Right) noexcept( noexcept(_Fake_copy_init(_Left <= _Right._Current))) /* strengthened */ { return _Left <= _Right._Current; } - template <_Not_bci_order<_Iter> _Other> + template <_Not_a_const_iterator _Other> + requires random_access_iterator<_Iter> && totally_ordered_with<_Iter, _Other> _NODISCARD_FRIEND constexpr bool operator>=(const _Other& _Left, const basic_const_iterator& _Right) noexcept( noexcept(_Fake_copy_init(_Left >= _Right._Current))) /* strengthened */ { return _Left >= _Right._Current; @@ -2669,29 +2665,19 @@ namespace ranges { _NODISCARD constexpr auto _As_const_pointer(const _Ty* _Ptr) noexcept { return _Ptr; } - - template - using _Begin_on_const = decltype(_RANGES begin(_RANGES _Possibly_const_range(_STD declval<_Ty&>()))); - - // TRANSITION, LLVM-55945 - template - concept _Range_accessible_and_begin_adaptable = _Should_range_access<_Ty> && requires(_Ty& _Val) { - const_iterator<_Begin_on_const<_Ty>>{_RANGES begin(_RANGES _Possibly_const_range(_Val))}; - }; - - template - using _End_on_const = decltype(_RANGES end(_RANGES _Possibly_const_range(_STD declval<_Ty&>()))); - - // TRANSITION, LLVM-55945 - template - concept _Range_accessible_and_end_adaptable = _Should_range_access<_Ty> && requires(_Ty& _Val) { - const_sentinel<_End_on_const<_Ty>>{_RANGES end(_RANGES _Possibly_const_range(_Val))}; - }; #endif // _HAS_CXX23 struct _Cbegin_fn { #if _HAS_CXX23 - template <_Range_accessible_and_begin_adaptable _Ty> + template + using _Begin_on_const = decltype(_RANGES begin(_RANGES _Possibly_const_range(_STD declval<_Ty&>()))); + + template <_Should_range_access _Ty> + requires requires(_Ty& _Val) { + typename _Begin_on_const<_Ty>; + typename const_iterator<_Begin_on_const<_Ty>>; + const_iterator<_Begin_on_const<_Ty>>{_RANGES begin(_RANGES _Possibly_const_range(_Val))}; + } _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept( noexcept(const_iterator<_Begin_on_const<_Ty>>{_RANGES begin(_RANGES _Possibly_const_range(_Val))})) { return const_iterator<_Begin_on_const<_Ty>>{_RANGES begin(_RANGES _Possibly_const_range(_Val))}; @@ -2713,7 +2699,15 @@ namespace ranges { struct _Cend_fn { #if _HAS_CXX23 - template <_Range_accessible_and_end_adaptable _Ty> + template + using _End_on_const = decltype(_RANGES end(_RANGES _Possibly_const_range(_STD declval<_Ty&>()))); + + template <_Should_range_access _Ty> + requires requires(_Ty& _Val) { + typename _End_on_const<_Ty>; + typename const_sentinel<_End_on_const<_Ty>>; + const_sentinel<_End_on_const<_Ty>>{_RANGES end(_RANGES _Possibly_const_range(_Val))}; + } _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(noexcept(const_sentinel<_End_on_const<_Ty>>{_RANGES end(_RANGES _Possibly_const_range(_Val))})) { return const_sentinel<_End_on_const<_Ty>>{_RANGES end(_RANGES _Possibly_const_range(_Val))}; @@ -2872,29 +2866,17 @@ namespace ranges { _EXPORT_STD inline constexpr _Rend::_Cpo rend; } -#if _HAS_CXX23 - template - using _Rbegin_on_const = decltype(_RANGES rbegin(_RANGES _Possibly_const_range(_STD declval<_Ty&>()))); - - // TRANSITION, LLVM-55945 - template - concept _Range_accessible_and_rbegin_adaptable = _Should_range_access<_Ty> && requires(_Ty& _Val) { - const_iterator<_Rbegin_on_const<_Ty>>{_RANGES rbegin(_RANGES _Possibly_const_range(_Val))}; - }; - - template - using _Rend_on_const = decltype(_RANGES rend(_RANGES _Possibly_const_range(_STD declval<_Ty&>()))); - - // TRANSITION, LLVM-55945 - template - concept _Range_accessible_and_rend_adaptable = _Should_range_access<_Ty> && requires(_Ty& _Val) { - const_sentinel<_Rend_on_const<_Ty>>{_RANGES rend(_RANGES _Possibly_const_range(_Val))}; - }; -#endif // _HAS_CXX23 - struct _Crbegin_fn { #if _HAS_CXX23 - template <_Range_accessible_and_rbegin_adaptable _Ty> + template + using _Rbegin_on_const = decltype(_RANGES rbegin(_RANGES _Possibly_const_range(_STD declval<_Ty&>()))); + + template <_Should_range_access _Ty> + requires requires(_Ty& _Val) { + typename _Rbegin_on_const<_Ty>; + typename const_iterator<_Rbegin_on_const<_Ty>>; + const_iterator<_Rbegin_on_const<_Ty>>{_RANGES rbegin(_RANGES _Possibly_const_range(_Val))}; + } _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept( noexcept(const_iterator<_Rbegin_on_const<_Ty>>{_RANGES rbegin(_RANGES _Possibly_const_range(_Val))})) { return const_iterator<_Rbegin_on_const<_Ty>>{_RANGES rbegin(_RANGES _Possibly_const_range(_Val))}; @@ -2916,7 +2898,15 @@ namespace ranges { struct _Crend_fn { #if _HAS_CXX23 - template <_Range_accessible_and_rend_adaptable _Ty> + template + using _Rend_on_const = decltype(_RANGES rend(_RANGES _Possibly_const_range(_STD declval<_Ty&>()))); + + template <_Should_range_access _Ty> + requires requires(_Ty& _Val) { + typename _Rend_on_const<_Ty>; + typename const_sentinel<_Rend_on_const<_Ty>>; + const_sentinel<_Rend_on_const<_Ty>>{_RANGES rend(_RANGES _Possibly_const_range(_Val))}; + } _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(noexcept(const_sentinel<_Rend_on_const<_Ty>>{_RANGES rend(_RANGES _Possibly_const_range(_Val))})) { return const_sentinel<_Rend_on_const<_Ty>>{_RANGES rend(_RANGES _Possibly_const_range(_Val))}; @@ -3139,17 +3129,12 @@ namespace ranges { _EXPORT_STD inline constexpr _Data::_Cpo data; } -#if _HAS_CXX23 - // TRANSITION, LLVM-55945 - template - concept _Range_accessible_and_data_adaptable = _Should_range_access<_Ty> && requires(_Ty& _Val) { - _RANGES _As_const_pointer(_RANGES data(_RANGES _Possibly_const_range(_Val))); - }; -#endif // _HAS_CXX23 - struct _Cdata_fn { #if _HAS_CXX23 - template <_Range_accessible_and_data_adaptable _Ty> + template <_Should_range_access _Ty> + requires requires(_Ty& _Val) { // + _RANGES _As_const_pointer(_RANGES data(_RANGES _Possibly_const_range(_Val))); + } _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(noexcept(_RANGES data(_RANGES _Possibly_const_range(_Val)))) { return _RANGES _As_const_pointer(_RANGES data(_RANGES _Possibly_const_range(_Val))); diff --git a/tests/std/tests/P1208R6_source_location/test.cpp b/tests/std/tests/P1208R6_source_location/test.cpp index 671fc0b33e..d41dc8d319 100644 --- a/tests/std/tests/P1208R6_source_location/test.cpp +++ b/tests/std/tests/P1208R6_source_location/test.cpp @@ -82,22 +82,26 @@ constexpr void sloc_constructor_test() { const s x; assert(x.loc.line() == __LINE__ - 1); assert(x.loc.column() == 13); +#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 + assert(x.loc.function_name() == "sloc_constructor_test"sv); +#else // ^^^ workaround / no workaround vvv if (is_constant_evaluated()) { assert(x.loc.function_name() == "int __cdecl main(void)"sv); // TRANSITION, VSO-1285783 } else { -#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 - assert(x.loc.function_name() == "sloc_constructor_test"sv); -#else // ^^^ workaround / no workaround vvv assert(x.loc.function_name() == "void __cdecl sloc_constructor_test(void)"sv); -#endif // TRANSITION, DevCom-10199227 and LLVM-58951 } +#endif // TRANSITION, DevCom-10199227 and LLVM-58951 assert(string_view{x.loc.file_name()}.ends_with(test_cpp)); } constexpr void different_constructor_test() { const s x{1}; assert(x.loc.line() == s_int_line); +#ifdef __clang__ + assert(x.loc.column() == 15); +#else // ^^^ defined(__clang__) / !defined(__clang__) vvv assert(x.loc.column() == 5); +#endif // ^^^ !defined(__clang__) ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(x.loc.function_name() == "s"sv); #elif defined(_M_IX86) // ^^^ workaround / no workaround vvv @@ -112,20 +116,24 @@ constexpr void sub_member_test() { const s2 s; assert(s.x.loc.line() == __LINE__ - 1); assert(s.x.loc.column() == 14); +#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 + assert(s.x.loc.function_name() == "sub_member_test"sv); +#else // ^^^ workaround / no workaround vvv if (is_constant_evaluated()) { assert(s.x.loc.function_name() == "int __cdecl main(void)"sv); // TRANSITION, VSO-1285783 } else { -#if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 - assert(s.x.loc.function_name() == "sub_member_test"sv); -#else // ^^^ workaround / no workaround vvv assert(s.x.loc.function_name() == "void __cdecl sub_member_test(void)"sv); -#endif // TRANSITION, DevCom-10199227 and LLVM-58951 } +#endif // TRANSITION, DevCom-10199227 and LLVM-58951 assert(string_view{s.x.loc.file_name()}.ends_with(test_cpp)); const s2 s_i{1}; assert(s_i.x.loc.line() == s2_int_line); +#ifdef __clang__ + assert(s_i.x.loc.column() == 15); +#else // ^^^ defined(__clang__) / !defined(__clang__) vvv assert(s_i.x.loc.column() == 5); +#endif // ^^^ !defined(__clang__) ^^^ #if defined(__clang__) || defined(__EDG__) // TRANSITION, DevCom-10199227 and LLVM-58951 assert(s_i.x.loc.function_name() == "s2"sv); #elif defined(_M_IX86) // ^^^ workaround / no workaround vvv @@ -201,21 +209,17 @@ constexpr void function_template_test() { constexpr bool test() { copy_test(); local_test(); -#ifndef __clang__ // TRANSITION, LLVM-56379 argument_test(__LINE__, 5); -#endif // __clang__ #ifdef __clang__ const auto loc = source_location::current(); argument_test(__LINE__ - 1, 22, loc); -#else // ^^^ defined(__clang__) / !defined(__clang__) +#else // ^^^ defined(__clang__) / !defined(__clang__) vvv const auto loc = source_location::current(); argument_test(__LINE__ - 1, 39, loc); #endif // ^^^ !defined(__clang__) ^^^ -#ifndef __clang__ // TRANSITION, LLVM-56379 sloc_constructor_test(); different_constructor_test(); sub_member_test(); -#endif // __clang__ lambda_test(); function_template_test(); header_test(); diff --git a/tests/std/tests/P1522R1_difference_type/test.cpp b/tests/std/tests/P1522R1_difference_type/test.cpp index fa26a332c6..e2a1dc731b 100644 --- a/tests/std/tests/P1522R1_difference_type/test.cpp +++ b/tests/std/tests/P1522R1_difference_type/test.cpp @@ -41,12 +41,6 @@ namespace ordtest { #define CONSTEVAL constexpr #endif // ^^^ !_HAS_CXX20 ^^^ -#if _HAS_CXX20 && !defined(__clang__) // TRANSITION, LLVM-51840 -#define CONSTEVAL_CLANG_WORKAROUND consteval -#else // ^^^ _HAS_CXX20 && !defined(__clang__) / !_HAS_CXX20 || defined(__clang__) vvv -#define CONSTEVAL_CLANG_WORKAROUND constexpr -#endif // ^^^ !_HAS_CXX20 || defined(__clang__) ^^^ - using std::_Signed128; using std::_Unsigned128; @@ -62,7 +56,7 @@ namespace i128_udl_detail { _Unsigned128 value; }; - [[nodiscard]] CONSTEVAL_CLANG_WORKAROUND unsigned int char_to_digit(const char c) noexcept { + [[nodiscard]] CONSTEVAL unsigned int char_to_digit(const char c) noexcept { if (c >= '0' && c <= '9') { return static_cast(c - '0'); }