diff --git a/stl/inc/__msvc_bit_utils.hpp b/stl/inc/__msvc_bit_utils.hpp index febf026e5..37135c09b 100644 --- a/stl/inc/__msvc_bit_utils.hpp +++ b/stl/inc/__msvc_bit_utils.hpp @@ -376,19 +376,19 @@ constexpr decltype(auto) _Select_countr_zero_impl(_Fn _Callback) { #if _HAS_TZCNT_BSF_INTRINSICS && _HAS_CXX20 if (!_STD is_constant_evaluated()) { #ifdef __AVX2__ - return _Callback([](_Ty _Val) { return _Countr_zero_tzcnt(_Val); }); + return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Countr_zero_tzcnt(_Val); }); #else // ^^^ AVX2 / not AVX2 vvv const bool _Definitely_have_tzcnt = __isa_available >= _Stl_isa_available_avx2; if (_Definitely_have_tzcnt) { - return _Callback([](_Ty _Val) { return _Countr_zero_tzcnt(_Val); }); + return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Countr_zero_tzcnt(_Val); }); } else { - return _Callback([](_Ty _Val) { return _Countr_zero_bsf(_Val); }); + return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Countr_zero_bsf(_Val); }); } #endif // ^^^ not AVX2 ^^^ } #endif // ^^^ _HAS_TZCNT_BSF_INTRINSICS && _HAS_CXX20 ^^^ // C++17 constexpr gcd() calls this function, so it should be constexpr unless we detect runtime evaluation. - return _Callback([](_Ty _Val) { return _Countr_zero_fallback(_Val); }); + return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Countr_zero_fallback(_Val); }); } template , int> = 0> @@ -420,16 +420,16 @@ _CONSTEXPR20 decltype(auto) _Select_popcount_impl(_Fn _Callback) { #ifndef __AVX__ const bool _Definitely_have_popcnt = __isa_available >= _Stl_isa_available_sse42; if (!_Definitely_have_popcnt) { - return _Callback([](_Ty _Val) { return _Popcount_fallback(_Val); }); + return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Popcount_fallback(_Val); }); } #endif // !defined(__AVX__) - return _Callback([](_Ty _Val) { return _Unchecked_x86_x64_popcount(_Val); }); + return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Unchecked_x86_x64_popcount(_Val); }); #elif _HAS_NEON_INTRINSICS // ^^^ x86/x64 intrinsics available / ARM64 intrinsics available vvv - return _Callback([](_Ty _Val) { return _Arm64_popcount(_Val); }); + return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Arm64_popcount(_Val); }); #endif // ^^^ ARM64 intrinsics available ^^^ } #endif // ^^^ any intrinsics available ^^^ - return _Callback([](_Ty _Val) { return _Popcount_fallback(_Val); }); + return _Callback([](_Ty _Val) _STATIC_CALL_OPERATOR { return _Popcount_fallback(_Val); }); } #undef _HAS_POPCNT_INTRINSICS diff --git a/stl/inc/__msvc_tzdb.hpp b/stl/inc/__msvc_tzdb.hpp index 7bed2d445..43fc7e53b 100644 --- a/stl/inc/__msvc_tzdb.hpp +++ b/stl/inc/__msvc_tzdb.hpp @@ -101,28 +101,28 @@ struct _Tzdb_deleter; template <> struct _Tzdb_deleter<__std_tzdb_time_zones_info> { - void operator()(__std_tzdb_time_zones_info* _Info) const noexcept { + _STATIC_CALL_OPERATOR void operator()(__std_tzdb_time_zones_info* _Info) _CONST_CALL_OPERATOR noexcept { __std_tzdb_delete_time_zones(_Info); } }; template <> struct _Tzdb_deleter<__std_tzdb_current_zone_info> { - void operator()(__std_tzdb_current_zone_info* _Info) const noexcept { + _STATIC_CALL_OPERATOR void operator()(__std_tzdb_current_zone_info* _Info) _CONST_CALL_OPERATOR noexcept { __std_tzdb_delete_current_zone(_Info); } }; template <> struct _Tzdb_deleter<__std_tzdb_sys_info> { - void operator()(__std_tzdb_sys_info* _Info) const noexcept { + _STATIC_CALL_OPERATOR void operator()(__std_tzdb_sys_info* _Info) _CONST_CALL_OPERATOR noexcept { __std_tzdb_delete_sys_info(_Info); } }; template <> struct _Tzdb_deleter<__std_tzdb_leap_info[]> { - void operator()(__std_tzdb_leap_info* _Info) const noexcept { + _STATIC_CALL_OPERATOR void operator()(__std_tzdb_leap_info* _Info) _CONST_CALL_OPERATOR noexcept { __std_tzdb_delete_leap_seconds(_Info); } }; diff --git a/stl/inc/algorithm b/stl/inc/algorithm index 19d78ba35..5c6cc9e67 100644 --- a/stl/inc/algorithm +++ b/stl/inc/algorithm @@ -324,7 +324,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirectly_unary_invocable> _Fn> - constexpr for_each_result<_It, _Fn> operator()(_It _First, _Se _Last, _Fn _Func, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr for_each_result<_It, _Fn> operator()( + _It _First, _Se _Last, _Fn _Func, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _For_each_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -336,8 +337,8 @@ namespace ranges { template , _Pj>> _Fn> - constexpr for_each_result, _Fn> operator()( - _Rng&& _Range, _Fn _Func, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr for_each_result, _Fn> operator()( + _Rng&& _Range, _Fn _Func, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _For_each_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), @@ -371,8 +372,8 @@ namespace ranges { class _For_each_n_fn { public: template > _Fn> - constexpr for_each_n_result<_It, _Fn> operator()( - _It _First, iter_difference_t<_It> _Count, _Fn _Func, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr for_each_n_result<_It, _Fn> operator()( + _It _First, iter_difference_t<_It> _Count, _Fn _Func, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if (0 < _Count) { auto _UFirst = _STD _Get_unwrapped_n(_STD move(_First), _Count); do { @@ -459,8 +460,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity> requires indirect_binary_predicate, const _Ty*> - _NODISCARD constexpr iter_difference_t<_It> operator()( - _It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr iter_difference_t<_It> operator()( + _It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _Count_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _Val, _STD _Pass_fn(_Proj)); @@ -468,7 +469,8 @@ namespace ranges { template requires indirect_binary_predicate, _Pj>, const _Ty*> - _NODISCARD constexpr range_difference_t<_Rng> operator()(_Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr range_difference_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { return _Count_unchecked(_Ubegin(_Range), _Uend(_Range), _Val, _STD _Pass_fn(_Proj)); } @@ -538,7 +540,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr iter_difference_t<_It> operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr iter_difference_t<_It> operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _Count_if_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -546,7 +549,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr range_difference_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr range_difference_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { return _Count_if_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); } @@ -715,8 +719,8 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, class _Pr = ranges::equal_to, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_comparable<_It1, _It2, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, - _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, + _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UFirst1 = _RANGES _Unwrap_iter<_Se1>(_STD move(_First1)); @@ -741,8 +745,8 @@ namespace ranges { template requires indirectly_comparable, iterator_t<_Rng2>, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr bool operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { if constexpr (sized_range<_Rng1> && sized_range<_Rng2>) { using _Size1 = _Make_unsigned_like_t>; const auto _Count = static_cast<_Size1>(_RANGES size(_Range1)); @@ -864,8 +868,8 @@ namespace ranges { template _Se1, forward_iterator _It2, sentinel_for<_It2> _Se2, class _Pj1 = identity, class _Pj2 = identity, indirect_equivalence_relation, projected<_It2, _Pj2>> _Pr = ranges::equal_to> - _NODISCARD constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, - _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, + _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UFirst1 = _RANGES _Unwrap_iter<_Se1>(_STD move(_First1)); @@ -890,8 +894,8 @@ namespace ranges { template , _Pj1>, projected, _Pj2>> _Pr = ranges::equal_to> - _NODISCARD constexpr bool operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { if constexpr (sized_range<_Rng1> && sized_range<_Rng2>) { const auto _Count = _RANGES distance(_Range1); if (_RANGES distance(_Range2) != _Count) { @@ -1155,7 +1159,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr bool operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _All_of_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -1164,7 +1169,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr bool operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { return _All_of_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); } @@ -1215,7 +1221,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr bool operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _Any_of_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -1224,7 +1231,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr bool operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { return _Any_of_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); } @@ -1275,7 +1283,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr bool operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _None_of_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -1284,7 +1293,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr bool operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { return _None_of_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); } @@ -1312,7 +1322,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity> requires indirect_binary_predicate, const _Ty*> - _NODISCARD constexpr bool operator()(_It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); const auto _ULast = _RANGES _Unwrap_sent<_It>(_STD move(_Last)); const auto _UResult = _RANGES _Find_unchecked( @@ -1322,7 +1333,8 @@ namespace ranges { template requires indirect_binary_predicate, _Pj>, const _Ty*> - _NODISCARD constexpr bool operator()(_Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _UResult = _RANGES _Find_unchecked(_Ubegin(_Range), _Uend(_Range), _Val, _STD _Pass_fn(_Proj)); return _UResult != _Uend(_Range); } @@ -1335,8 +1347,8 @@ namespace ranges { template _Se1, forward_iterator _It2, sentinel_for<_It2> _Se2, class _Pr = ranges::equal_to, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_comparable<_It1, _It2, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, - _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, + _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First2, _Last2); auto _UFirst2 = _RANGES _Unwrap_iter<_Se2>(_STD move(_First2)); auto _ULast2 = _RANGES _Unwrap_sent<_It2>(_STD move(_Last2)); @@ -1353,8 +1365,8 @@ namespace ranges { template requires indirectly_comparable, iterator_t<_Rng2>, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr bool operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { if (_RANGES empty(_Range2)) { return true; } @@ -1375,7 +1387,8 @@ namespace ranges { public: template requires indirectly_copyable<_It, _Out> - constexpr copy_n_result<_It, _Out> operator()(_It _First, iter_difference_t<_It> _Count, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr copy_n_result<_It, _Out> operator()( + _It _First, iter_difference_t<_It> _Count, _Out _Result) _CONST_CALL_OPERATOR { auto _UFirst = _STD _Get_unwrapped_n(_STD move(_First), _Count); if constexpr (_Iter_copy_cat::_Bitcopy_assignable) { if (!_STD is_constant_evaluated()) { @@ -1404,7 +1417,8 @@ namespace ranges { public: template _Se1, bidirectional_iterator _It2> requires indirectly_copyable<_It1, _It2> - constexpr copy_backward_result<_It1, _It2> operator()(_It1 _First, _Se1 _Last, _It2 _Result) const { + _STATIC_CALL_OPERATOR constexpr copy_backward_result<_It1, _It2> operator()( + _It1 _First, _Se1 _Last, _It2 _Result) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se1>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It1>(_UFirst, _STD move(_Last)); @@ -1415,7 +1429,8 @@ namespace ranges { template requires indirectly_copyable, _It> - constexpr copy_backward_result, _It> operator()(_Rng&& _Range, _It _Result) const { + _STATIC_CALL_OPERATOR constexpr copy_backward_result, _It> operator()( + _Rng&& _Range, _It _Result) _CONST_CALL_OPERATOR { auto _ULast = _RANGES _Get_final_iterator_unwrapped(_Range); _Result = _STD _Copy_backward_unchecked(_Ubegin(_Range), _ULast, _STD move(_Result)); return {_RANGES _Rewrap_iterator(_Range, _STD move(_ULast)), _STD move(_Result)}; @@ -1464,8 +1479,8 @@ namespace ranges { template _Se, weakly_incrementable _Out, class _Pj = identity, indirect_unary_predicate> _Pr> requires indirectly_copyable<_It, _Out> - constexpr copy_if_result<_It, _Out> operator()( - _It _First, _Se _Last, _Out _Result, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr copy_if_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Copy_if_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD move(_Result), _STD _Pass_fn(_Pred), @@ -1477,8 +1492,8 @@ namespace ranges { template , _Pj>> _Pr> requires indirectly_copyable, _Out> - constexpr copy_if_result, _Out> operator()( - _Rng&& _Range, _Out _Result, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr copy_if_result, _Out> operator()( + _Rng&& _Range, _Out _Result, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Copy_if_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD move(_Result), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -1533,7 +1548,8 @@ namespace ranges { public: template _Se, weakly_incrementable _Out> requires indirectly_movable<_It, _Out> - constexpr move_result<_It, _Out> operator()(_It _First, _Se _Last, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr move_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _RANGES _Move_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD move(_Result)); @@ -1544,7 +1560,8 @@ namespace ranges { template requires indirectly_movable, _Out> - constexpr move_result, _Out> operator()(_Rng&& _Range, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr move_result, _Out> operator()( + _Rng&& _Range, _Out _Result) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _RANGES _Move_unchecked( _RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD move(_Result)); @@ -1580,7 +1597,8 @@ namespace ranges { public: template _Se1, bidirectional_iterator _It2> requires indirectly_movable<_It1, _It2> - constexpr move_backward_result<_It1, _It2> operator()(_It1 _First, _Se1 _Last, _It2 _Result) const { + _STATIC_CALL_OPERATOR constexpr move_backward_result<_It1, _It2> operator()( + _It1 _First, _Se1 _Last, _It2 _Result) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se1>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It1>(_UFirst, _STD move(_Last)); @@ -1591,7 +1609,8 @@ namespace ranges { template requires indirectly_movable, _It> - constexpr move_backward_result, _It> operator()(_Rng&& _Range, _It _Result) const { + _STATIC_CALL_OPERATOR constexpr move_backward_result, _It> operator()( + _Rng&& _Range, _It _Result) _CONST_CALL_OPERATOR { auto _ULast = _RANGES _Get_final_iterator_unwrapped(_Range); _Result = _RANGES _Move_backward_common(_Ubegin(_Range), _ULast, _STD move(_Result)); return {_RANGES _Rewrap_iterator(_Range, _STD move(_ULast)), _STD move(_Result)}; @@ -1649,8 +1668,8 @@ namespace ranges { template _Se, weakly_incrementable _Out1, weakly_incrementable _Out2, class _Pj = identity, indirect_unary_predicate> _Pr> requires indirectly_copyable<_It, _Out1> && indirectly_copyable<_It, _Out2> - constexpr partition_copy_result<_It, _Out1, _Out2> operator()( - _It _First, _Se _Last, _Out1 _Dest_true, _Out2 _Dest_false, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr partition_copy_result<_It, _Out1, _Out2> operator()(_It _First, _Se _Last, + _Out1 _Dest_true, _Out2 _Dest_false, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UResult = _Partition_copy_unchecked(_Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last)), _Get_unwrapped_unverified(_STD move(_Dest_true)), @@ -1664,8 +1683,8 @@ namespace ranges { template , _Pj>> _Pr> requires indirectly_copyable, _Out1> && indirectly_copyable, _Out2> - constexpr partition_copy_result, _Out1, _Out2> operator()( - _Rng&& _Range, _Out1 _Dest_true, _Out2 _Dest_false, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr partition_copy_result, _Out1, _Out2> operator()( + _Rng&& _Range, _Out1 _Dest_true, _Out2 _Dest_false, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Partition_copy_unchecked(_Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _Get_unwrapped_unverified(_STD move(_Dest_true)), _Get_unwrapped_unverified(_STD move(_Dest_false)), @@ -1743,7 +1762,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr bool operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); return _Is_partitioned_unchecked(_Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last)), _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -1751,7 +1771,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr bool operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { return _Is_partitioned_unchecked(_Ubegin(_Range), _Uend(_Range), _Pass_fn(_Pred), _Pass_fn(_Proj)); } @@ -1817,7 +1838,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _Unwrap_iter<_Se>(_STD move(_First)); if constexpr (sized_sentinel_for<_Se, _It>) { @@ -1834,7 +1856,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if constexpr (sized_range<_Rng>) { const auto _Length = _RANGES distance(_Range); auto _UFirst = _Partition_point_n_unchecked(_Ubegin(_Range), _Length, _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -2102,8 +2125,8 @@ namespace ranges { template _Se, class _Ty, class _Pr = ranges::equal_to, class _Pj = identity> requires indirectly_comparable<_It, const _Ty*, _Pr, _Pj> - _NODISCARD constexpr subrange<_It> operator()(_It _First, _Se _Last, const iter_difference_t<_It> _Count, - const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()(_It _First, _Se _Last, + const iter_difference_t<_It> _Count, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); if (_Count <= 0) { @@ -2127,8 +2150,9 @@ namespace ranges { template requires indirectly_comparable, const _Ty*, _Pr, _Pj> - _NODISCARD constexpr borrowed_subrange_t<_Rng> operator()(_Rng&& _Range, const range_difference_t<_Rng> _Count, - const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()(_Rng&& _Range, + const range_difference_t<_Rng> _Count, const _Ty& _Val, _Pr _Pred = {}, + _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); if (_Count <= 0) { @@ -2258,8 +2282,8 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, class _Pr = ranges::equal_to, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_comparable<_It1, _It2, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, - _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, + _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); @@ -2288,8 +2312,8 @@ namespace ranges { template requires indirectly_comparable, iterator_t<_Rng2>, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr bool operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { if constexpr (_Sized_or_infinite_range<_Rng1> && sized_range<_Rng2>) { const range_difference_t<_Rng2> _Count2 = _RANGES distance(_Range2); if constexpr (sized_range<_Rng1>) { @@ -2319,8 +2343,8 @@ namespace ranges { requires (forward_iterator<_It1> || sized_sentinel_for<_Se1, _It1>) && (forward_iterator<_It2> || sized_sentinel_for<_Se2, _It2>) && indirectly_comparable<_It1, _It2, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, - _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, + _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UFirst1 = _RANGES _Unwrap_iter<_Se1>(_STD move(_First1)); @@ -2339,8 +2363,8 @@ namespace ranges { class _Pj2 = identity> requires (forward_range<_Rng1> || sized_range<_Rng1>) && (forward_range<_Rng2> || sized_range<_Rng2>) && indirectly_comparable, iterator_t<_Rng2>, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr bool operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { const auto _Count1 = _Distance_helper(_Range1); const auto _Count2 = _Distance_helper(_Range2); @@ -2569,21 +2593,23 @@ namespace ranges { class _Fold_left_with_iter_fn { public: template _Se, class _Ty, _Indirectly_binary_left_foldable<_Ty, _It> _Fn> - _NODISCARD constexpr auto operator()(_It _First, _Se _Last, _Ty _Init, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _It _First, _Se _Last, _Ty _Init, _Fn _Func) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _Fold_left_with_iter_impl<_It>( _STD move(_First), _STD move(_Last), _STD move(_Init), _STD _Pass_fn(_Func)); } template > _Fn> - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Ty _Init, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, _Ty _Init, _Fn _Func) _CONST_CALL_OPERATOR { return _Fold_left_with_iter_impl>( _RANGES begin(_Range), _RANGES end(_Range), _STD move(_Init), _STD _Pass_fn(_Func)); } private: template - _NODISCARD constexpr auto _Fold_left_with_iter_impl(_It&& _First, _Se&& _Last, _Ty&& _Init, _Fn _Func) const { + _NODISCARD static constexpr auto _Fold_left_with_iter_impl(_It&& _First, _Se&& _Last, _Ty&& _Init, _Fn _Func) { _STL_INTERNAL_STATIC_ASSERT(input_iterator<_It>); _STL_INTERNAL_STATIC_ASSERT(sentinel_for<_Se, _It>); _STL_INTERNAL_STATIC_ASSERT(_Indirectly_binary_left_foldable<_Fn, _Ty, _It>); @@ -2613,12 +2639,14 @@ namespace ranges { class _Fold_left_fn { public: template _Se, class _Ty, _Indirectly_binary_left_foldable<_Ty, _It> _Fn> - _NODISCARD constexpr auto operator()(_It _First, _Se _Last, _Ty _Init, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _It _First, _Se _Last, _Ty _Init, _Fn _Func) _CONST_CALL_OPERATOR { return _RANGES fold_left_with_iter(_STD move(_First), _Last, _STD move(_Init), _STD _Pass_fn(_Func)).value; } template > _Fn> - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Ty _Init, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, _Ty _Init, _Fn _Func) _CONST_CALL_OPERATOR { return _RANGES fold_left_with_iter(_STD forward<_Rng>(_Range), _STD move(_Init), _STD _Pass_fn(_Func)) .value; } @@ -2631,21 +2659,22 @@ namespace ranges { template _Se, _Indirectly_binary_left_foldable, _It> _Fn> requires constructible_from, iter_reference_t<_It>> - _NODISCARD constexpr auto operator()(_It _First, _Se _Last, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _It _First, _Se _Last, _Fn _Func) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _Fold_left_first_with_iter_impl<_It>(_STD move(_First), _STD move(_Last), _STD _Pass_fn(_Func)); } template , iterator_t<_Rng>> _Fn> requires constructible_from, range_reference_t<_Rng>> - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Fn _Func) _CONST_CALL_OPERATOR { return _Fold_left_first_with_iter_impl>( _RANGES begin(_Range), _RANGES end(_Range), _STD _Pass_fn(_Func)); } private: template - _NODISCARD constexpr auto _Fold_left_first_with_iter_impl(_It&& _First, _Se&& _Last, _Fn _Func) const { + _NODISCARD static constexpr auto _Fold_left_first_with_iter_impl(_It&& _First, _Se&& _Last, _Fn _Func) { _STL_INTERNAL_STATIC_ASSERT(input_iterator<_It>); _STL_INTERNAL_STATIC_ASSERT(sentinel_for<_Se, _It>); _STL_INTERNAL_STATIC_ASSERT(_Indirectly_binary_left_foldable<_Fn, iter_value_t<_It>, _It>); @@ -2679,13 +2708,14 @@ namespace ranges { template _Se, _Indirectly_binary_left_foldable, _It> _Fn> requires constructible_from, iter_reference_t<_It>> - _NODISCARD constexpr auto operator()(_It _First, _Se _Last, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _It _First, _Se _Last, _Fn _Func) _CONST_CALL_OPERATOR { return _RANGES fold_left_first_with_iter(_STD move(_First), _STD move(_Last), _STD _Pass_fn(_Func)).value; } template , iterator_t<_Rng>> _Fn> requires constructible_from, range_reference_t<_Rng>> - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Fn _Func) _CONST_CALL_OPERATOR { return _RANGES fold_left_first_with_iter(_STD forward<_Rng>(_Range), _STD _Pass_fn(_Func)).value; } }; @@ -2715,14 +2745,16 @@ namespace ranges { public: template _Se, class _Ty, _Indirectly_binary_right_foldable<_Ty, _It> _Fn> - _NODISCARD constexpr auto operator()(_It _First, _Se _Last, _Ty _Init, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _It _First, _Se _Last, _Ty _Init, _Fn _Func) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _RANGES _Fold_right_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD move(_Init), _STD _Pass_fn(_Func)); } template > _Fn> - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Ty _Init, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, _Ty _Init, _Fn _Func) _CONST_CALL_OPERATOR { return _RANGES _Fold_right_unchecked( _Ubegin(_Range), _Uend(_Range), _STD move(_Init), _STD _Pass_fn(_Func)); } @@ -2735,7 +2767,8 @@ namespace ranges { template _Se, _Indirectly_binary_right_foldable, _It> _Fn> requires constructible_from, iter_reference_t<_It>> - _NODISCARD constexpr auto operator()(_It _First, _Se _Last, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _It _First, _Se _Last, _Fn _Func) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); return _Fold_right_last_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Pass_fn(_Func)); @@ -2744,13 +2777,13 @@ namespace ranges { template , iterator_t<_Rng>> _Fn> requires constructible_from, range_reference_t<_Rng>> - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Fn _Func) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Fn _Func) _CONST_CALL_OPERATOR { return _Fold_right_last_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Func)); } private: template - _NODISCARD constexpr auto _Fold_right_last_unchecked(_It _First, _Se _Last, _Fn _Func) const { + _NODISCARD static constexpr auto _Fold_right_last_unchecked(_It _First, _Se _Last, _Fn _Func) { _STL_INTERNAL_STATIC_ASSERT(bidirectional_iterator<_It>); _STL_INTERNAL_STATIC_ASSERT(sentinel_for<_Se, _It>); _STL_INTERNAL_STATIC_ASSERT(_Indirectly_binary_right_foldable<_Fn, iter_value_t<_It>, _It>); @@ -2773,7 +2806,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity> requires indirect_binary_predicate, const _Ty*> - _NODISCARD constexpr subrange<_It> operator()(_It _First, _Se _Last, const _Ty& _Value, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, _Se _Last, const _Ty& _Value, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); @@ -2792,8 +2826,8 @@ namespace ranges { template requires indirect_binary_predicate, _Pj>, const _Ty*> - _NODISCARD constexpr borrowed_subrange_t<_Rng> operator()( - _Rng&& _Range, const _Ty& _Value, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Value, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if constexpr (bidirectional_range<_Rng>) { auto _UResult = _Find_last_unchecked( _Ubegin(_Range), _RANGES _Get_final_iterator_unwrapped(_Range), _Value, _STD _Pass_fn(_Proj)); @@ -2873,7 +2907,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr subrange<_It> operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); @@ -2892,7 +2927,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr borrowed_subrange_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if constexpr (bidirectional_range<_Rng>) { auto _UResult = _Find_last_if_unchecked(_Ubegin(_Range), _RANGES _Get_final_iterator_unwrapped(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -3161,8 +3197,8 @@ namespace ranges { template _Se1, forward_iterator _It2, sentinel_for<_It2> _Se2, class _Pr = ranges::equal_to, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_comparable<_It1, _It2, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr subrange<_It1> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, - _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr subrange<_It1> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, + _Se2 _Last2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UFirst1 = _RANGES _Unwrap_iter<_Se1>(_First1); @@ -3191,8 +3227,8 @@ namespace ranges { template requires indirectly_comparable, iterator_t<_Rng2>, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr borrowed_subrange_t<_Rng1> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng1> operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { if constexpr (random_access_range<_Rng1> && sized_range<_Rng1> && random_access_range<_Rng2> && sized_range<_Rng2>) { auto _UResult = @@ -3263,8 +3299,8 @@ namespace ranges { template _Se1, forward_iterator _It2, sentinel_for<_It2> _Se2, class _Pr = ranges::equal_to, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_comparable<_It1, _It2, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr _It1 operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, - _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It1 operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, + _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); @@ -3280,8 +3316,8 @@ namespace ranges { template requires indirectly_comparable, iterator_t<_Rng2>, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr borrowed_iterator_t<_Rng1> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng1> operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _UResult = _Find_first_of_unchecked(_RANGES _Unwrap_range_iter<_Rng1>(_STD move(_First1)), @@ -3333,8 +3369,8 @@ namespace ranges { public: template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2> requires indirectly_swappable<_It1, _It2> - constexpr swap_ranges_result<_It1, _It2> operator()( - _It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2) const { + _STATIC_CALL_OPERATOR constexpr swap_ranges_result<_It1, _It2> operator()( + _It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); @@ -3349,8 +3385,8 @@ namespace ranges { template requires indirectly_swappable, iterator_t<_Rng2>> - constexpr swap_ranges_result, borrowed_iterator_t<_Rng2>> operator()( - _Rng1&& _Range1, _Rng2&& _Range2) const { + _STATIC_CALL_OPERATOR constexpr swap_ranges_result, borrowed_iterator_t<_Rng2>> + operator()(_Rng1&& _Range1, _Rng2&& _Range2) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _First2 = _RANGES begin(_Range2); @@ -3504,8 +3540,8 @@ namespace ranges { template _Se, weakly_incrementable _Out, copy_constructible _Fn, class _Pj = identity> requires indirectly_writable<_Out, indirect_result_t<_Fn&, projected<_It, _Pj>>> - constexpr unary_transform_result<_It, _Out> operator()( - _It _First, _Se _Last, _Out _Result, _Fn _Func, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr unary_transform_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result, _Fn _Func, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Transform_unary_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD move(_Result), _STD _Pass_fn(_Func), @@ -3517,8 +3553,8 @@ namespace ranges { template requires indirectly_writable<_Out, indirect_result_t<_Fn&, projected, _Pj>>> - constexpr unary_transform_result, _Out> operator()( - _Rng&& _Range, _Out _Result, _Fn _Func, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr unary_transform_result, _Out> operator()( + _Rng&& _Range, _Out _Result, _Fn _Func, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Transform_unary_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD move(_Result), _STD _Pass_fn(_Func), _STD _Pass_fn(_Proj)); @@ -3530,8 +3566,9 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, weakly_incrementable _Out, copy_constructible _Fn, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_writable<_Out, indirect_result_t<_Fn&, projected<_It1, _Pj1>, projected<_It2, _Pj2>>> - constexpr binary_transform_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, - _Se2 _Last2, _Out _Result, _Fn _Func, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr binary_transform_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, + _It2 _First2, _Se2 _Last2, _Out _Result, _Fn _Func, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UResult = _Transform_binary_unchecked(_RANGES _Unwrap_iter<_Se1>(_STD move(_First1)), @@ -3548,8 +3585,10 @@ namespace ranges { class _Pj1 = identity, class _Pj2 = identity> requires indirectly_writable<_Out, indirect_result_t<_Fn&, projected, _Pj1>, projected, _Pj2>>> - constexpr binary_transform_result, borrowed_iterator_t<_Rng2>, _Out> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Fn _Func, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr binary_transform_result, borrowed_iterator_t<_Rng2>, + _Out> + operator()(_Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Fn _Func, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _First2 = _RANGES begin(_Range2); auto _UResult = _Transform_binary_unchecked(_RANGES _Unwrap_range_iter<_Rng1>(_STD move(_First1)), @@ -3625,8 +3664,8 @@ namespace ranges { template _Se, class _Ty1, class _Ty2, class _Pj = identity> requires indirectly_writable<_It, const _Ty2&> && indirect_binary_predicate, const _Ty1*> - constexpr _It operator()( - _It _First, _Se _Last, const _Ty1& _Oldval, const _Ty2& _Newval, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, const _Ty1& _Oldval, const _Ty2& _Newval, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Replace_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _Oldval, _Newval, _STD _Pass_fn(_Proj)); @@ -3638,8 +3677,8 @@ namespace ranges { template requires indirectly_writable, const _Ty2&> && indirect_binary_predicate, _Pj>, const _Ty1*> - constexpr borrowed_iterator_t<_Rng> operator()( - _Rng&& _Range, const _Ty1& _Oldval, const _Ty2& _Newval, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, const _Ty1& _Oldval, const _Ty2& _Newval, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Replace_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _Oldval, _Newval, _STD _Pass_fn(_Proj)); @@ -3697,7 +3736,8 @@ namespace ranges { template _Se, class _Ty, class _Pj = identity, indirect_unary_predicate> _Pr> requires indirectly_writable<_It, const _Ty&> - constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred, const _Ty& _Newval, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred, const _Ty& _Newval, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Replace_if_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Pass_fn(_Pred), _Newval, _STD _Pass_fn(_Proj)); @@ -3709,8 +3749,8 @@ namespace ranges { template , _Pj>> _Pr> requires indirectly_writable, const _Ty&> - constexpr borrowed_iterator_t<_Rng> operator()( - _Rng&& _Range, _Pr _Pred, const _Ty& _Newval, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, const _Ty& _Newval, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Replace_if_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD _Pass_fn(_Pred), _Newval, _STD _Pass_fn(_Proj)); @@ -3785,8 +3825,8 @@ namespace ranges { class _Pj = identity> requires indirectly_copyable<_It, _Out> && indirect_binary_predicate, const _Ty1*> - constexpr replace_copy_result<_It, _Out> operator()( - _It _First, _Se _Last, _Out _Result, const _Ty1& _Oldval, const _Ty2& _Newval, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr replace_copy_result<_It, _Out> operator()(_It _First, _Se _Last, _Out _Result, + const _Ty1& _Oldval, const _Ty2& _Newval, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Replace_copy_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD move(_Result), _Oldval, _Newval, @@ -3799,8 +3839,8 @@ namespace ranges { template _Out, class _Pj = identity> requires indirectly_copyable, _Out> && indirect_binary_predicate, _Pj>, const _Ty1*> - constexpr replace_copy_result, _Out> operator()( - _Rng&& _Range, _Out _Result, const _Ty1& _Oldval, const _Ty2& _Newval, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr replace_copy_result, _Out> operator()(_Rng&& _Range, + _Out _Result, const _Ty1& _Oldval, const _Ty2& _Newval, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Replace_copy_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD move(_Result), _Oldval, _Newval, _STD _Pass_fn(_Proj)); @@ -3878,8 +3918,8 @@ namespace ranges { template _Se, class _Ty, output_iterator _Out, class _Pj = identity, indirect_unary_predicate> _Pr> requires indirectly_copyable<_It, _Out> - constexpr replace_copy_if_result<_It, _Out> operator()( - _It _First, _Se _Last, _Out _Result, _Pr _Pred, const _Ty& _Newval, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr replace_copy_if_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result, _Pr _Pred, const _Ty& _Newval, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Replace_copy_if_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD move(_Result), _STD _Pass_fn(_Pred), _Newval, @@ -3892,8 +3932,8 @@ namespace ranges { template _Out, class _Pj = identity, indirect_unary_predicate, _Pj>> _Pr> requires indirectly_copyable, _Out> - constexpr replace_copy_if_result, _Out> operator()( - _Rng&& _Range, _Out _Result, _Pr _Pred, const _Ty& _Newval, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr replace_copy_if_result, _Out> operator()( + _Rng&& _Range, _Out _Result, _Pr _Pred, const _Ty& _Newval, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Replace_copy_if_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD move(_Result), _STD _Pass_fn(_Pred), _Newval, _STD _Pass_fn(_Proj)); @@ -3930,7 +3970,7 @@ namespace ranges { class _Fill_fn { public: template _It, sentinel_for<_It> _Se> - constexpr _It operator()(_It _First, _Se _Last, const _Ty& _Value) const { + _STATIC_CALL_OPERATOR constexpr _It operator()(_It _First, _Se _Last, const _Ty& _Value) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); const auto _ULast = _RANGES _Unwrap_sent<_It>(_STD move(_Last)); @@ -3961,10 +4001,11 @@ namespace ranges { } template _Rng> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, const _Ty& _Value) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Value) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); _STD _Seek_wrapped( - _First, (*this)(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _Value)); + _First, operator()(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _Value)); return _First; } }; @@ -3975,7 +4016,7 @@ namespace ranges { public: template _Se, copy_constructible _Fn> requires invocable<_Fn&> && indirectly_writable<_Out, invoke_result_t<_Fn&>> - constexpr _Out operator()(_Out _First, _Se _Last, _Fn _Gen) const { + _STATIC_CALL_OPERATOR constexpr _Out operator()(_Out _First, _Se _Last, _Fn _Gen) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); _STD _Seek_wrapped(_First, _Generate_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_Out>(_STD move(_Last)), _STD _Pass_fn(_Gen))); @@ -3984,7 +4025,8 @@ namespace ranges { template requires invocable<_Fn&> && output_range<_Rng, invoke_result_t<_Fn&>> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Fn _Gen) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Fn _Gen) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); _STD _Seek_wrapped(_First, _Generate_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD _Pass_fn(_Gen))); @@ -4014,7 +4056,8 @@ namespace ranges { public: template requires invocable<_Fn&> && indirectly_writable<_Out, invoke_result_t<_Fn&>> - constexpr _Out operator()(_Out _First, iter_difference_t<_Out> _Count, _Fn _Gen) const { + _STATIC_CALL_OPERATOR constexpr _Out operator()( + _Out _First, iter_difference_t<_Out> _Count, _Fn _Gen) _CONST_CALL_OPERATOR { if (_Count > 0) { auto _UFirst = _STD _Get_unwrapped_n(_STD move(_First), _Count); do { @@ -4151,8 +4194,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity> requires indirect_binary_predicate, const _Ty*> - _NODISCARD_REMOVE_ALG constexpr subrange<_It> operator()( - _It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) const { + _NODISCARD_REMOVE_ALG _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Remove_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _Val, _STD _Pass_fn(_Proj)); @@ -4163,8 +4206,8 @@ namespace ranges { template requires permutable> && indirect_binary_predicate, _Pj>, const _Ty*> - _NODISCARD_REMOVE_ALG constexpr borrowed_subrange_t<_Rng> operator()( - _Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) const { + _NODISCARD_REMOVE_ALG _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _Remove_unchecked(_Ubegin(_Range), _Uend(_Range), _Val, _STD _Pass_fn(_Proj)); return _RANGES _Rewrap_subrange>(_Range, _STD move(_UResult)); @@ -4202,8 +4245,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD_REMOVE_ALG constexpr subrange<_It> operator()( - _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD_REMOVE_ALG _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Remove_if_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -4214,8 +4257,8 @@ namespace ranges { template , _Pj>> _Pr> requires permutable> - _NODISCARD_REMOVE_ALG constexpr borrowed_subrange_t<_Rng> operator()( - _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD_REMOVE_ALG _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _Remove_if_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -4258,8 +4301,8 @@ namespace ranges { template _Se, weakly_incrementable _Out, class _Ty, class _Pj = identity> requires indirectly_copyable<_It, _Out> && indirect_binary_predicate, const _Ty*> - constexpr remove_copy_result<_It, _Out> operator()( - _It _First, _Se _Last, _Out _Result, const _Ty& _Val, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr remove_copy_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Remove_copy_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Get_unwrapped_unverified(_STD move(_Result)), _Val, @@ -4273,8 +4316,8 @@ namespace ranges { template requires indirectly_copyable, _Out> && indirect_binary_predicate, _Pj>, const _Ty*> - constexpr remove_copy_result, _Out> operator()( - _Rng&& _Range, _Out _Result, const _Ty& _Val, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr remove_copy_result, _Out> operator()( + _Rng&& _Range, _Out _Result, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Remove_copy_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD _Get_unwrapped_unverified(_STD move(_Result)), _Val, _STD _Pass_fn(_Proj)); @@ -4316,8 +4359,8 @@ namespace ranges { template _Se, weakly_incrementable _Out, class _Pj = identity, indirect_unary_predicate> _Pr> requires indirectly_copyable<_It, _Out> - constexpr remove_copy_if_result<_It, _Out> operator()( - _It _First, _Se _Last, _Out _Result, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr remove_copy_if_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Remove_copy_if_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Get_unwrapped_unverified(_STD move(_Result)), @@ -4331,8 +4374,8 @@ namespace ranges { template , _Pj>> _Pr> requires indirectly_copyable, _Out> - constexpr remove_copy_if_result, _Out> operator()( - _Rng&& _Range, _Out _Result, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr remove_copy_if_result, _Out> operator()( + _Rng&& _Range, _Out _Result, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Remove_copy_if_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), @@ -4423,8 +4466,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_equivalence_relation> _Pr = ranges::equal_to> - _NODISCARD_UNIQUE_ALG constexpr subrange<_It> operator()( - _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD_UNIQUE_ALG _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Unique_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -4435,8 +4478,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::equal_to> requires permutable> - _NODISCARD_UNIQUE_ALG constexpr borrowed_subrange_t<_Rng> operator()( - _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD_UNIQUE_ALG _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _Unique_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -4589,8 +4632,8 @@ namespace ranges { template _Se, weakly_incrementable _Out, class _Pj = identity, indirect_equivalence_relation> _Pr = ranges::equal_to> requires indirectly_copyable<_It, _Out> && _Can_reread_or_store<_It, _Out> - constexpr unique_copy_result<_It, _Out> operator()( - _It _First, _Se _Last, _Out _Result, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr unique_copy_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Unique_copy_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Get_unwrapped_unverified(_STD move(_Result)), @@ -4604,8 +4647,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::equal_to> requires indirectly_copyable, _Out> && _Can_reread_or_store, _Out> - constexpr unique_copy_result, _Out> operator()( - _Rng&& _Range, _Out _Result, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr unique_copy_result, _Out> operator()( + _Rng&& _Range, _Out _Result, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Unique_copy_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD _Get_unwrapped_unverified(_STD move(_Result)), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -4715,7 +4758,7 @@ namespace ranges { public: template _Se> requires permutable<_It> - constexpr _It operator()(_It _First, _Se _Last) const { + _STATIC_CALL_OPERATOR constexpr _It operator()(_It _First, _Se _Last) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -4726,7 +4769,7 @@ namespace ranges { template requires permutable> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range) _CONST_CALL_OPERATOR { auto _ULast = _RANGES _Get_final_iterator_unwrapped(_Range); _RANGES _Reverse_common(_Ubegin(_Range), _ULast); return _RANGES _Rewrap_iterator(_Range, _STD move(_ULast)); @@ -4806,7 +4849,8 @@ namespace ranges { public: template _Se, weakly_incrementable _Out> requires indirectly_copyable<_It, _Out> - constexpr reverse_copy_result<_It, _Out> operator()(_It _First, _Se _Last, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr reverse_copy_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -4817,7 +4861,8 @@ namespace ranges { template requires indirectly_copyable, _Out> - constexpr reverse_copy_result, _Out> operator()(_Rng&& _Range, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr reverse_copy_result, _Out> operator()( + _Rng&& _Range, _Out _Result) _CONST_CALL_OPERATOR { if constexpr (common_range<_Rng>) { _Result = _Reverse_copy_common(_Ubegin(_Range), _Uend(_Range), _STD move(_Result)); return {_RANGES end(_Range), _STD move(_Result)}; @@ -4960,7 +5005,7 @@ namespace ranges { class _Rotate_fn { public: template _Se> - constexpr subrange<_It> operator()(_It _First, _It _Mid, _Se _Last) const { + _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()(_It _First, _It _Mid, _Se _Last) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Mid); _STD _Adl_verify_range(_Mid, _Last); auto _UResult = _RANGES _Rotate_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -4971,7 +5016,8 @@ namespace ranges { template requires permutable> - constexpr borrowed_subrange_t<_Rng> operator()(_Rng&& _Range, iterator_t<_Rng> _Mid) const { + _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, iterator_t<_Rng> _Mid) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_RANGES begin(_Range), _Mid); _STD _Adl_verify_range(_Mid, _RANGES end(_Range)); auto _UResult = _RANGES _Rotate_unchecked( @@ -5018,7 +5064,8 @@ namespace ranges { public: template _Se, weakly_incrementable _Out> requires indirectly_copyable<_It, _Out> - constexpr rotate_copy_result<_It, _Out> operator()(_It _First, _It _Mid, _Se _Last, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr rotate_copy_result<_It, _Out> operator()( + _It _First, _It _Mid, _Se _Last, _Out _Result) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Mid); _STD _Adl_verify_range(_Mid, _Last); auto _UResult = _Rotate_copy_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -5031,8 +5078,8 @@ namespace ranges { template requires indirectly_copyable, _Out> - constexpr rotate_copy_result, _Out> operator()( - _Rng&& _Range, iterator_t<_Rng> _Mid, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr rotate_copy_result, _Out> operator()( + _Rng&& _Range, iterator_t<_Rng> _Mid, _Out _Result) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_RANGES begin(_Range), _Mid); _STD _Adl_verify_range(_Mid, _RANGES end(_Range)); auto _UResult = _Rotate_copy_unchecked( @@ -5222,7 +5269,8 @@ namespace ranges { template _Se, weakly_incrementable _Out, class _Urng> requires (forward_iterator<_It> || random_access_iterator<_Out>) && indirectly_copyable<_It, _Out> && uniform_random_bit_generator> - _Out operator()(_It _First, _Se _Last, _Out _Result, iter_difference_t<_It> _Count, _Urng&& _Func) const { + _STATIC_CALL_OPERATOR _Out operator()( + _It _First, _Se _Last, _Out _Result, iter_difference_t<_It> _Count, _Urng&& _Func) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); if (_Count <= 0) { return _Result; @@ -5243,7 +5291,8 @@ namespace ranges { requires (forward_range<_Rng> || random_access_iterator<_Out>) && indirectly_copyable, _Out> && uniform_random_bit_generator> - _Out operator()(_Rng&& _Range, _Out _Result, range_difference_t<_Rng> _Count, _Urng&& _Func) const { + _STATIC_CALL_OPERATOR _Out operator()( + _Rng&& _Range, _Out _Result, range_difference_t<_Rng> _Count, _Urng&& _Func) _CONST_CALL_OPERATOR { if (_Count <= 0) { return _Result; } @@ -5353,7 +5402,7 @@ namespace ranges { public: template _Se, class _Urng> requires permutable<_It> && uniform_random_bit_generator> - _It operator()(_It _First, _Se _Last, _Urng&& _Func) const { + _STATIC_CALL_OPERATOR _It operator()(_It _First, _Se _Last, _Urng&& _Func) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); _Rng_from_urng, remove_reference_t<_Urng>> _RngFunc(_Func); @@ -5366,7 +5415,7 @@ namespace ranges { template requires permutable> && uniform_random_bit_generator> - borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Urng&& _Func) const { + _STATIC_CALL_OPERATOR borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Urng&& _Func) _CONST_CALL_OPERATOR { _Rng_from_urng, remove_reference_t<_Urng>> _RngFunc(_Func); return _RANGES _Rewrap_iterator(_Range, _Shuffle_unchecked(_Ubegin(_Range), _Uend(_Range), _RngFunc)); @@ -5568,7 +5617,8 @@ namespace ranges { class _Shift_left_fn { public: template _Se> - constexpr subrange<_It> operator()(_It _First, const _Se _Last, iter_difference_t<_It> _Pos_to_shift) const { + _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, const _Se _Last, iter_difference_t<_It> _Pos_to_shift) _CONST_CALL_OPERATOR { _STL_ASSERT(_Pos_to_shift >= 0, "shift count must be non-negative (N4950 [alg.shift]/1)"); _STD _Adl_verify_range(_First, _Last); @@ -5587,7 +5637,8 @@ namespace ranges { template requires permutable> - constexpr borrowed_subrange_t<_Rng> operator()(_Rng&& _Range, range_difference_t<_Rng> _Pos_to_shift) const { + _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, range_difference_t<_Rng> _Pos_to_shift) _CONST_CALL_OPERATOR { _STL_ASSERT(_Pos_to_shift >= 0, "shift count must be non-negative (N4950 [alg.shift]/1)"); if (_Pos_to_shift == 0) { @@ -5632,7 +5683,8 @@ namespace ranges { class _Shift_right_fn { public: template _Se> - constexpr subrange<_It> operator()(_It _First, const _Se _Last, iter_difference_t<_It> _Pos_to_shift) const { + _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, const _Se _Last, iter_difference_t<_It> _Pos_to_shift) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_First); auto _ULast = _RANGES _Unwrap_sent<_It>(_Last); @@ -5646,7 +5698,8 @@ namespace ranges { template requires permutable> - constexpr borrowed_subrange_t<_Rng> operator()(_Rng&& _Range, range_difference_t<_Rng> _Pos_to_shift) const { + _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, range_difference_t<_Rng> _Pos_to_shift) _CONST_CALL_OPERATOR { const auto _Size = _Size_helper(_Range); auto _Result = _Shift_right_impl(_Ubegin(_Range), _Uend(_Range), _Pos_to_shift, _Size); auto _First = _RANGES _Rewrap_iterator(_Range, _Result.begin()); @@ -5856,7 +5909,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - constexpr subrange<_It> operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UResult = _Partition_unchecked(_Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last)), _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -5866,7 +5920,8 @@ namespace ranges { template , _Pj>> _Pr> requires permutable> - constexpr borrowed_subrange_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _Partition_unchecked(_Ubegin(_Range), _Uend(_Range), _Pass_fn(_Pred), _Pass_fn(_Proj)); return _Rewrap_subrange>(_Range, _STD move(_UResult)); } @@ -6142,7 +6197,8 @@ namespace ranges { template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> requires permutable<_It> - subrange<_It> operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR subrange<_It> operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -6155,7 +6211,8 @@ namespace ranges { template , _Pj>> _Pr> requires permutable> - borrowed_subrange_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _ULast = _Get_final_iterator_unwrapped(_Range); auto _UResult = _Stable_partition_common(_Ubegin(_Range), _STD move(_ULast), _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -6359,7 +6416,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -6370,7 +6428,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if constexpr (common_range<_Rng>) { _Push_heap_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); return _RANGES end(_Range); @@ -6536,7 +6595,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -6548,7 +6608,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if constexpr (common_range<_Rng>) { _RANGES _Pop_heap_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); return _RANGES end(_Range); @@ -6609,7 +6670,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -6621,7 +6683,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if constexpr (common_range<_Rng>) { _RANGES _Make_heap_common(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); return _RANGES end(_Range); @@ -6732,7 +6795,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr bool operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); const auto _ULast = _RANGES _Unwrap_sent<_It>(_STD move(_Last)); @@ -6744,7 +6808,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr bool operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _Size = _RANGES distance(_Range); const auto _UResult = _RANGES _Is_heap_until_unchecked(_Ubegin(_Range), _Size, _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -6758,7 +6823,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); const auto _Size = _RANGES distance(_UFirst, _RANGES _Unwrap_sent<_It>(_STD move(_Last))); @@ -6770,7 +6836,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _Size = _RANGES distance(_Range); auto _UResult = _RANGES _Is_heap_until_unchecked(_Ubegin(_Range), _Size, _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -6825,7 +6892,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -6837,7 +6905,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if constexpr (common_range<_Rng>) { _RANGES _Sort_heap_common(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); return _RANGES end(_Range); @@ -6878,8 +6947,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr _It operator()( - _It _First, _Se _Last, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _Unwrap_iter<_Se>(_STD move(_First)); const auto _Count = _RANGES distance(_UFirst, _Unwrap_sent<_It>(_STD move(_Last))); @@ -6891,8 +6960,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()( - _Rng&& _Range, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _Count = _RANGES distance(_Range); auto _UResult = _RANGES _Lower_bound_unchecked(_Ubegin(_Range), _Count, _Val, _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -6929,8 +6998,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr _It operator()( - _It _First, _Se _Last, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _Unwrap_iter<_Se>(_STD move(_First)); const auto _Count = _RANGES distance(_UFirst, _Unwrap_sent<_It>(_STD move(_Last))); @@ -6942,8 +7011,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()( - _Rng&& _Range, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _Count = _RANGES distance(_Range); auto _UResult = _RANGES _Upper_bound_unchecked(_Ubegin(_Range), _Count, _Val, _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -7004,8 +7073,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr subrange<_It> operator()( - _It _First, _Se _Last, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr subrange<_It> operator()( + _It _First, _Se _Last, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _Unwrap_iter<_Se>(_STD move(_First)); const auto _Count = _RANGES distance(_UFirst, _Unwrap_sent<_It>(_STD move(_Last))); @@ -7015,8 +7084,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr borrowed_subrange_t<_Rng> operator()( - _Rng&& _Range, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _Count = _RANGES distance(_Range); auto _UResult = _Equal_range_unchecked(_Ubegin(_Range), _Count, _Val, _Pass_fn(_Pred), _Pass_fn(_Proj)); auto _Result = _RANGES begin(_Range); @@ -7081,8 +7150,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr bool operator()( - _It _First, _Se _Last, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _It _First, _Se _Last, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _Unwrap_iter<_Se>(_STD move(_First)); const auto _ULast = _Unwrap_sent<_It>(_STD move(_Last)); @@ -7094,7 +7163,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr bool operator()(_Rng&& _Range, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng&& _Range, const _Ty& _Val, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _Count = _RANGES distance(_Range); const auto _UFirst = _RANGES _Lower_bound_unchecked(_Ubegin(_Range), _Count, _Val, _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -7207,8 +7277,9 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, weakly_incrementable _Out, class _Pr = ranges::less, class _Pj1 = identity, class _Pj2 = identity> requires mergeable<_It1, _It2, _Out, _Pr, _Pj1, _Pj2> - constexpr merge_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, - _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr merge_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, + _It2 _First2, _Se2 _Last2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UResult = _Merge_unchecked(_RANGES _Unwrap_iter<_Se1>(_STD move(_First1)), @@ -7223,8 +7294,9 @@ namespace ranges { template requires mergeable, iterator_t<_Rng2>, _Out, _Pr, _Pj1, _Pj2> - constexpr merge_result, borrowed_iterator_t<_Rng2>, _Out> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr merge_result, borrowed_iterator_t<_Rng2>, _Out> + operator()(_Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _First2 = _RANGES begin(_Range2); auto _UResult = _Merge_unchecked(_RANGES _Unwrap_range_iter<_Rng1>(_STD move(_First1)), _Uend(_Range1), @@ -7763,7 +7835,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - _It operator()(_It _First, _It _Mid, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR _It operator()( + _It _First, _It _Mid, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Mid); _STD _Adl_verify_range(_Mid, _Last); @@ -7778,8 +7851,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - borrowed_iterator_t<_Rng> operator()( - _Rng&& _Range, iterator_t<_Rng> _Mid, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, iterator_t<_Rng> _Mid, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _Last = _RANGES end(_Range); @@ -8192,7 +8265,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -8204,7 +8278,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UFirst = _Ubegin(_Range); auto _ULast = _Get_final_iterator_unwrapped(_Range); const auto _Count = _ULast - _UFirst; @@ -8456,7 +8531,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -8469,7 +8545,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UFirst = _Ubegin(_Range); auto _ULast = _Get_final_iterator_unwrapped(_Range); @@ -8754,7 +8831,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr _It operator()(_It _First, _It _Mid, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _It _Mid, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Mid); _Adl_verify_range(_Mid, _Last); @@ -8774,8 +8852,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr borrowed_iterator_t<_Rng> operator()( - _Rng&& _Range, iterator_t<_Rng> _Mid, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, iterator_t<_Rng> _Mid, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_RANGES begin(_Range), _Mid); _Adl_verify_range(_Mid, _RANGES end(_Range)); @@ -8891,8 +8969,8 @@ namespace ranges { class _Pr = ranges::less, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_copyable<_It1, _It2> && sortable<_It2, _Pr, _Pj2> && indirect_strict_weak_order<_Pr, projected<_It1, _Pj1>, projected<_It2, _Pj2>> - constexpr partial_sort_copy_result<_It1, _It2> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, - _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr partial_sort_copy_result<_It1, _It2> operator()(_It1 _First1, _Se1 _Last1, + _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First1, _Last1); _Adl_verify_range(_First2, _Last2); @@ -8910,8 +8988,9 @@ namespace ranges { requires indirectly_copyable, iterator_t<_Rng2>> && sortable, _Pr, _Pj2> && indirect_strict_weak_order<_Pr, projected, _Pj1>, projected, _Pj2>> - constexpr partial_sort_copy_result, borrowed_iterator_t<_Rng2>> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr partial_sort_copy_result, borrowed_iterator_t<_Rng2>> + operator()(_Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range1); auto _UResult = _Partial_sort_copy_unchecked(_Unwrap_range_iter<_Rng1>(_STD move(_First)), _Uend(_Range1), _Ubegin(_Range2), _Uend(_Range2), _Pass_fn(_Pred), _Pass_fn(_Proj1), _Pass_fn(_Proj2)); @@ -9022,7 +9101,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr _It operator()(_It _First, _It _Nth, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _It _Nth, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Nth); _Adl_verify_range(_Nth, _Last); auto _UNth = _Unwrap_iter<_Se>(_Nth); @@ -9036,8 +9116,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr borrowed_iterator_t<_Rng> operator()( - _Rng&& _Range, iterator_t<_Rng> _Nth, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, iterator_t<_Rng> _Nth, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_RANGES begin(_Range), _Nth); _Adl_verify_range(_Nth, _RANGES end(_Range)); auto _UNth = _Unwrap_range_iter<_Rng>(_Nth); @@ -9147,8 +9227,8 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, class _Pj1 = identity, class _Pj2 = identity, indirect_strict_weak_order, projected<_It2, _Pj2>> _Pr = ranges::less> - _NODISCARD constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, - _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, + _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); return _Includes_unchecked(_RANGES _Unwrap_iter<_Se1>(_STD move(_First1)), @@ -9160,8 +9240,8 @@ namespace ranges { template , _Pj1>, projected, _Pj2>> _Pr = ranges::less> - _NODISCARD constexpr bool operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { return _Includes_unchecked(_Ubegin(_Range1), _Uend(_Range1), _Ubegin(_Range2), _Uend(_Range2), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj1), _STD _Pass_fn(_Proj2)); } @@ -9284,8 +9364,9 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, weakly_incrementable _Out, class _Pr = ranges::less, class _Pj1 = identity, class _Pj2 = identity> requires mergeable<_It1, _It2, _Out, _Pr, _Pj1, _Pj2> - constexpr set_union_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, - _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr set_union_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, + _It2 _First2, _Se2 _Last2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UResult = _Set_union_unchecked(_RANGES _Unwrap_iter<_Se1>(_STD move(_First1)), @@ -9301,8 +9382,9 @@ namespace ranges { template requires mergeable, iterator_t<_Rng2>, _Out, _Pr, _Pj1, _Pj2> - constexpr set_union_result, borrowed_iterator_t<_Rng2>, _Out> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr set_union_result, borrowed_iterator_t<_Rng2>, _Out> + operator()(_Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _First2 = _RANGES begin(_Range2); auto _UResult = _Set_union_unchecked(_RANGES _Unwrap_range_iter<_Rng1>(_STD move(_First1)), _Uend(_Range1), @@ -9410,8 +9492,9 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, weakly_incrementable _Out, class _Pr = ranges::less, class _Pj1 = identity, class _Pj2 = identity> requires mergeable<_It1, _It2, _Out, _Pr, _Pj1, _Pj2> - constexpr set_intersection_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, - _Se2 _Last2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr set_intersection_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, + _It2 _First2, _Se2 _Last2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UResult = _Set_intersection_unchecked(_RANGES _Unwrap_iter<_Se1>(_STD move(_First1)), @@ -9427,8 +9510,10 @@ namespace ranges { template requires mergeable, iterator_t<_Rng2>, _Out, _Pr, _Pj1, _Pj2> - constexpr set_intersection_result, borrowed_iterator_t<_Rng2>, _Out> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr set_intersection_result, borrowed_iterator_t<_Rng2>, + _Out> + operator()(_Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _First2 = _RANGES begin(_Range2); auto _UResult = _Set_intersection_unchecked(_RANGES _Unwrap_range_iter<_Rng1>(_STD move(_First1)), @@ -9543,8 +9628,9 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, weakly_incrementable _Out, class _Pr = ranges::less, class _Pj1 = identity, class _Pj2 = identity> requires mergeable<_It1, _It2, _Out, _Pr, _Pj1, _Pj2> - constexpr set_difference_result<_It1, _Out> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, - _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr set_difference_result<_It1, _Out> operator()(_It1 _First1, _Se1 _Last1, + _It2 _First2, _Se2 _Last2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UResult = _Set_difference_unchecked(_RANGES _Unwrap_iter<_Se1>(_STD move(_First1)), @@ -9559,8 +9645,9 @@ namespace ranges { template requires mergeable, iterator_t<_Rng2>, _Out, _Pr, _Pj1, _Pj2> - constexpr set_difference_result, _Out> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr set_difference_result, _Out> operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _UResult = _Set_difference_unchecked(_RANGES _Unwrap_range_iter<_Rng1>(_STD move(_First1)), _Uend(_Range1), _Ubegin(_Range2), _Uend(_Range2), _STD _Get_unwrapped_unverified(_STD move(_Result)), @@ -9685,8 +9772,9 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, weakly_incrementable _Out, class _Pr = ranges::less, class _Pj1 = identity, class _Pj2 = identity> requires mergeable<_It1, _It2, _Out, _Pr, _Pj1, _Pj2> - constexpr set_symmetric_difference_result<_It1, _It2, _Out> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, - _Se2 _Last2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _STATIC_CALL_OPERATOR constexpr set_symmetric_difference_result<_It1, _It2, _Out> operator()(_It1 _First1, + _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UResult = _Set_symmetric_difference_unchecked(_RANGES _Unwrap_iter<_Se1>(_STD move(_First1)), @@ -9702,9 +9790,10 @@ namespace ranges { template requires mergeable, iterator_t<_Rng2>, _Out, _Pr, _Pj1, _Pj2> - constexpr set_symmetric_difference_result, borrowed_iterator_t<_Rng2>, _Out> + _STATIC_CALL_OPERATOR constexpr set_symmetric_difference_result, + borrowed_iterator_t<_Rng2>, _Out> operator()(_Rng1&& _Range1, _Rng2&& _Range2, _Out _Result, _Pr _Pred = {}, _Pj1 _Proj1 = {}, - _Pj2 _Proj2 = {}) const { + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _First2 = _RANGES begin(_Range2); auto _UResult = _Set_symmetric_difference_unchecked(_RANGES _Unwrap_range_iter<_Rng1>(_STD move(_First1)), @@ -9859,8 +9948,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr minmax_element_result<_It> operator()( - _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr minmax_element_result<_It> operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Minmax_element_fwd_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -9872,8 +9961,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr minmax_element_result> operator()( - _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr minmax_element_result> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _Minmax_element_fwd_unchecked( _RANGES _Ubegin(_Range), _RANGES _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); return {_RANGES _Rewrap_iterator(_Range, _STD move(_UResult.min)), @@ -9999,8 +10088,9 @@ namespace ranges { public: template > _Pr = ranges::less> - _NODISCARD constexpr minmax_result operator()(const _Ty& _Left _MSVC_LIFETIMEBOUND, - const _Ty& _Right _MSVC_LIFETIMEBOUND, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr minmax_result operator()( + const _Ty& _Left _MSVC_LIFETIMEBOUND, const _Ty& _Right _MSVC_LIFETIMEBOUND, _Pr _Pred = {}, + _Pj _Proj = {}) _CONST_CALL_OPERATOR { if (_STD invoke(_Pred, _STD invoke(_Proj, _Right), _STD invoke(_Proj, _Left))) { return {_Right, _Left}; } else { @@ -10010,8 +10100,8 @@ namespace ranges { template > _Pr = ranges::less> - _NODISCARD constexpr minmax_result<_Ty> operator()( - initializer_list<_Ty> _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr minmax_result<_Ty> operator()( + initializer_list<_Ty> _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _First = _Range.begin(); const auto _Last = _Range.end(); _STL_ASSERT(_First != _Last, @@ -10022,8 +10112,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> requires indirectly_copyable_storable, range_value_t<_Rng>*> - _NODISCARD constexpr minmax_result> operator()( - _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr minmax_result> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UFirst = _RANGES _Ubegin(_Range); auto _ULast = _RANGES _Uend(_Range); _STL_ASSERT( @@ -10198,7 +10288,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr next_permutation_result<_It> operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr next_permutation_result<_It> operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -10210,8 +10301,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr next_permutation_result> operator()( - _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr next_permutation_result> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _ULast = _RANGES _Get_final_iterator_unwrapped(_Range); const bool _Found = _Next_permutation_common(_Ubegin(_Range), _ULast, _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -10301,7 +10392,8 @@ namespace ranges { public: template _Se, class _Pr = ranges::less, class _Pj = identity> requires sortable<_It, _Pr, _Pj> - constexpr prev_permutation_result<_It> operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr prev_permutation_result<_It> operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Unwrap_iter<_Se>(_STD move(_First)); auto _ULast = _RANGES _Get_final_iterator_unwrapped<_It>(_UFirst, _STD move(_Last)); @@ -10313,8 +10405,8 @@ namespace ranges { template requires sortable, _Pr, _Pj> - constexpr prev_permutation_result> operator()( - _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _STATIC_CALL_OPERATOR constexpr prev_permutation_result> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _ULast = _RANGES _Get_final_iterator_unwrapped(_Range); const bool _Found = _Prev_permutation_common(_Ubegin(_Range), _ULast, _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -10425,7 +10517,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr bool operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); const auto _ULast = _Unwrap_sent<_It>(_STD move(_Last)); const auto _UFirst = _RANGES _Is_sorted_until_unchecked( @@ -10435,7 +10528,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr bool operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _ULast = _Uend(_Range); const auto _UFirst = _RANGES _Is_sorted_until_unchecked(_Ubegin(_Range), _ULast, _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -10449,7 +10543,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UFirst = _RANGES _Is_sorted_until_unchecked(_Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last)), _Pass_fn(_Pred), _Pass_fn(_Proj)); @@ -10459,7 +10554,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _RANGES _Is_sorted_until_unchecked(_Ubegin(_Range), _Uend(_Range), _Pass_fn(_Pred), _Pass_fn(_Proj)); return _Rewrap_iterator(_Range, _STD move(_UResult)); @@ -10509,8 +10605,8 @@ namespace ranges { public: template > _Pr = ranges::less> - _NODISCARD constexpr const _Ty& operator()( - const _Ty& _Val, const _Ty& _Lo, const _Ty& _Hi, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr const _Ty& operator()( + const _Ty& _Val, const _Ty& _Lo, const _Ty& _Hi, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STL_ASSERT(!_STD invoke(_Pred, _STD invoke(_Proj, _Hi), _STD invoke(_Proj, _Lo)), "The lower bound cannot be greater than the upper bound in a call to std::ranges::clamp " "(N4950 [alg.clamp]/2)."); @@ -10536,8 +10632,8 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, class _Pj1 = identity, class _Pj2 = identity, indirect_strict_weak_order, projected<_It2, _Pj2>> _Pr = ranges::less> - _NODISCARD constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, - _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, + _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); @@ -10550,8 +10646,8 @@ namespace ranges { template , _Pj1>, projected, _Pj2>> _Pr = ranges::less> - _NODISCARD constexpr bool operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { return _Lexicographical_compare_unchecked(_Ubegin(_Range1), _Uend(_Range1), _Ubegin(_Range2), _Uend(_Range2), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj1), _STD _Pass_fn(_Proj2)); } diff --git a/stl/inc/bitset b/stl/inc/bitset index 627bf3306..e6e012bc9 100644 --- a/stl/inc/bitset +++ b/stl/inc/bitset @@ -602,7 +602,7 @@ struct hash> { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = bitset<_Bits>; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const bitset<_Bits>& _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const bitset<_Bits>& _Keyval) _CONST_CALL_OPERATOR noexcept { return _Hash_representation(_Keyval._Array); } }; diff --git a/stl/inc/compare b/stl/inc/compare index d5741f196..751ce2e39 100644 --- a/stl/inc/compare +++ b/stl/inc/compare @@ -341,7 +341,8 @@ _EXPORT_STD struct compare_three_way { struct _Synth_three_way { template - _NODISCARD constexpr auto operator()(const _Ty1& _Left, const _Ty2& _Right) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + const _Ty1& _Left, const _Ty2& _Right) _CONST_CALL_OPERATOR requires requires { { _Left < _Right } -> _Boolean_testable; { _Right < _Left } -> _Boolean_testable; @@ -409,8 +410,8 @@ namespace _Strong_order { public: template requires (_Choice<_Ty1&, _Ty2&>._Strategy != _St::_None) - _NODISCARD constexpr strong_ordering operator()(_Ty1&& _Left, _Ty2&& _Right) const - noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr strong_ordering operator()( + _Ty1&& _Left, _Ty2&& _Right) _CONST_CALL_OPERATOR noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { constexpr _St _Strat = _Choice<_Ty1&, _Ty2&>._Strategy; if constexpr (_Strat == _St::_Adl) { return static_cast(strong_order(_Left, _Right)); // intentional ADL @@ -516,8 +517,8 @@ namespace _Weak_order { public: template requires (_Choice<_Ty1&, _Ty2&>._Strategy != _St::_None) - _NODISCARD constexpr weak_ordering operator()(_Ty1&& _Left, _Ty2&& _Right) const - noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr weak_ordering operator()( + _Ty1&& _Left, _Ty2&& _Right) _CONST_CALL_OPERATOR noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { constexpr _St _Strat = _Choice<_Ty1&, _Ty2&>._Strategy; if constexpr (_Strat == _St::_Adl) { return static_cast(weak_order(_Left, _Right)); // intentional ADL @@ -647,8 +648,8 @@ namespace _Partial_order { public: template requires (_Choice<_Ty1&, _Ty2&>._Strategy != _St::_None) - _NODISCARD constexpr partial_ordering operator()(_Ty1&& _Left, _Ty2&& _Right) const - noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr partial_ordering operator()( + _Ty1&& _Left, _Ty2&& _Right) _CONST_CALL_OPERATOR noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { constexpr _St _Strat = _Choice<_Ty1&, _Ty2&>._Strategy; if constexpr (_Strat == _St::_Adl) { return static_cast(/* ADL */ partial_order(_Left, _Right)); @@ -709,8 +710,8 @@ namespace _Compare_strong_order_fallback { public: template requires (_Choice<_Ty1&, _Ty2&>._Strategy != _St::_None) - _NODISCARD constexpr strong_ordering operator()(_Ty1&& _Left, _Ty2&& _Right) const - noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr strong_ordering operator()( + _Ty1&& _Left, _Ty2&& _Right) _CONST_CALL_OPERATOR noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { constexpr _St _Strat = _Choice<_Ty1&, _Ty2&>._Strategy; if constexpr (_Strat == _St::_Strong) { return _STD strong_order(_Left, _Right); @@ -759,8 +760,8 @@ namespace _Compare_weak_order_fallback { public: template requires (_Choice<_Ty1&, _Ty2&>._Strategy != _St::_None) - _NODISCARD constexpr weak_ordering operator()(_Ty1&& _Left, _Ty2&& _Right) const - noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr weak_ordering operator()( + _Ty1&& _Left, _Ty2&& _Right) _CONST_CALL_OPERATOR noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { constexpr _St _Strat = _Choice<_Ty1&, _Ty2&>._Strategy; if constexpr (_Strat == _St::_Weak) { return _STD weak_order(_Left, _Right); @@ -817,8 +818,8 @@ namespace _Compare_partial_order_fallback { public: template requires (_Choice<_Ty1&, _Ty2&>._Strategy != _St::_None) - _NODISCARD constexpr partial_ordering operator()(_Ty1&& _Left, _Ty2&& _Right) const - noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr partial_ordering operator()( + _Ty1&& _Left, _Ty2&& _Right) _CONST_CALL_OPERATOR noexcept(_Choice<_Ty1&, _Ty2&>._No_throw) { constexpr _St _Strat = _Choice<_Ty1&, _Ty2&>._Strategy; if constexpr (_Strat == _St::_Partial) { return _STD partial_order(_Left, _Right); diff --git a/stl/inc/concepts b/stl/inc/concepts index ce4f05172..4cfc8f5db 100644 --- a/stl/inc/concepts +++ b/stl/inc/concepts @@ -122,14 +122,14 @@ namespace ranges { struct _Cpo { template requires _Use_ADL_swap<_Ty1, _Ty2> - constexpr void operator()(_Ty1&& __t, _Ty2&& __u) const + _STATIC_CALL_OPERATOR constexpr void operator()(_Ty1&& __t, _Ty2&& __u) _CONST_CALL_OPERATOR noexcept(noexcept(swap(static_cast<_Ty1&&>(__t), static_cast<_Ty2&&>(__u)))) { // intentional ADL swap(static_cast<_Ty1&&>(__t), static_cast<_Ty2&&>(__u)); // intentional ADL } template requires (!_Use_ADL_swap<_Ty&, _Ty&> && move_constructible<_Ty> && assignable_from<_Ty&, _Ty>) - constexpr void operator()(_Ty& __x, _Ty& __y) const + _STATIC_CALL_OPERATOR constexpr void operator()(_Ty& __x, _Ty& __y) _CONST_CALL_OPERATOR noexcept(is_nothrow_move_constructible_v<_Ty> && is_nothrow_move_assignable_v<_Ty>) { _Ty __tmp(static_cast<_Ty&&>(__x)); __x = static_cast<_Ty&&>(__y); @@ -137,11 +137,11 @@ namespace ranges { } template - constexpr void operator()(_Ty1 (&__t)[_Size], _Ty2 (&__u)[_Size]) const - noexcept(noexcept((*this)(__t[0], __u[0]))) - requires requires { (*this)(__t[0], __u[0]); } { + _STATIC_CALL_OPERATOR constexpr void operator()(_Ty1 (&__t)[_Size], _Ty2 (&__u)[_Size]) _CONST_CALL_OPERATOR + noexcept(noexcept(operator()(__t[0], __u[0]))) + requires requires(_Cpo __fn) { __fn(__t[0], __u[0]); } { for (size_t __i = 0; __i < _Size; ++__i) { - (*this)(__t[__i], __u[__i]); + operator()(__t[__i], __u[__i]); } } }; diff --git a/stl/inc/coroutine b/stl/inc/coroutine index aef71fc05..c41e6b36f 100644 --- a/stl/inc/coroutine +++ b/stl/inc/coroutine @@ -186,7 +186,8 @@ _NODISCARD constexpr bool operator>=(const coroutine_handle<> _Left, const corou template struct hash> { - _NODISCARD size_t operator()(const coroutine_handle<_Promise>& _Coro) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()( + const coroutine_handle<_Promise>& _Coro) _CONST_CALL_OPERATOR noexcept { return _Hash_representation(_Coro.address()); } }; diff --git a/stl/inc/execution b/stl/inc/execution index 6daa8a156..00d1806f8 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -3658,7 +3658,8 @@ template struct _Casty_plus { // Adds the two arguments together and casts the result back to _Ty. // pre: the result from adding the two arguments together can fit in _Ty - _NODISCARD constexpr _Ty operator()(_Ty _Val1, _Ty _Val2) const noexcept /* terminates */ { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _Ty operator()(_Ty _Val1, _Ty _Val2) _CONST_CALL_OPERATOR noexcept + /* terminates */ { return static_cast<_Ty>(_Val1 + _Val2); } }; @@ -5049,6 +5050,13 @@ _FwdIt2 adjacent_difference(_ExPo&&, const _FwdIt1 _First, const _FwdIt1 _Last, return _Dest; } +template +struct _Inplace_destroy_fn { + _STATIC_CALL_OPERATOR void operator()(_Ty& _Obj) _CONST_CALL_OPERATOR noexcept { + _STD _Destroy_in_place(_Obj); + } +}; + _EXPORT_STD template /* = 0 */> void destroy(_ExPo&& _Exec, const _NoThrowFwdIt _First, const _NoThrowFwdIt _Last) noexcept /* terminates */ { // destroy all elements in [_First, _Last) @@ -5056,7 +5064,7 @@ void destroy(_ExPo&& _Exec, const _NoThrowFwdIt _First, const _NoThrowFwdIt _Las _STD _Adl_verify_range(_First, _Last); using _Ty = remove_reference_t<_Iter_ref_t<_NoThrowFwdIt>>; if constexpr (!is_trivially_destructible_v<_Ty>) { - _STD for_each(_STD forward<_ExPo>(_Exec), _First, _Last, [](_Ty& _Obj) { _STD _Destroy_in_place(_Obj); }); + _STD for_each(_STD forward<_ExPo>(_Exec), _First, _Last, _Inplace_destroy_fn<_Ty>{}); } } @@ -5074,11 +5082,18 @@ _NoThrowFwdIt destroy_n(_ExPo&& _Exec, _NoThrowFwdIt _First, const _Diff _Count_ _STD advance(_First, _Count); return _First; } else { - return _STD for_each_n( - _STD forward<_ExPo>(_Exec), _First, _Count, [](_Ty& _Obj) { _STD _Destroy_in_place(_Obj); }); + return _STD for_each_n(_STD forward<_ExPo>(_Exec), _First, _Count, _Inplace_destroy_fn<_Ty>{}); } } +template +struct _Inplace_default_construct_fn { + _STATIC_CALL_OPERATOR void operator()(_Ty& _Obj) _CONST_CALL_OPERATOR + noexcept(is_nothrow_default_constructible_v<_Ty>) { + _STD _Default_construct_in_place(_Obj); + } +}; + _EXPORT_STD template /* = 0 */> void uninitialized_default_construct(_ExPo&& _Exec, const _NoThrowFwdIt _First, const _NoThrowFwdIt _Last) noexcept /* terminates */ { @@ -5087,8 +5102,7 @@ void uninitialized_default_construct(_ExPo&& _Exec, const _NoThrowFwdIt _First, _STD _Adl_verify_range(_First, _Last); using _Ty = remove_reference_t<_Iter_ref_t<_NoThrowFwdIt>>; if constexpr (!is_trivially_default_constructible_v<_Ty>) { - _STD for_each( - _STD forward<_ExPo>(_Exec), _First, _Last, [](_Ty& _Obj) { _STD _Default_construct_in_place(_Obj); }); + _STD for_each(_STD forward<_ExPo>(_Exec), _First, _Last, _Inplace_default_construct_fn<_Ty>{}); } } @@ -5107,11 +5121,18 @@ _NoThrowFwdIt uninitialized_default_construct_n(_ExPo&& _Exec, _NoThrowFwdIt _Fi _STD advance(_First, _Count); return _First; } else { - return _STD for_each_n( - _STD forward<_ExPo>(_Exec), _First, _Count, [](_Ty& _Obj) { _STD _Default_construct_in_place(_Obj); }); + return _STD for_each_n(_STD forward<_ExPo>(_Exec), _First, _Count, _Inplace_default_construct_fn<_Ty>{}); } } +template +struct _Inplace_value_construct_fn { + _STATIC_CALL_OPERATOR void operator()(_Ty& _Obj) _CONST_CALL_OPERATOR + noexcept(is_nothrow_default_constructible_v<_Ty>) { + _STD _Construct_in_place(_Obj); + } +}; + _EXPORT_STD template /* = 0 */> void uninitialized_value_construct(_ExPo&&, _NoThrowFwdIt _First, _NoThrowFwdIt _Last) noexcept /* terminates */ { // value-initialize all elements in [_First, _Last) @@ -5128,10 +5149,10 @@ void uninitialized_value_construct(_ExPo&&, _NoThrowFwdIt _First, _NoThrowFwdIt auto _Count = _STD distance(_UFirst, _ULast); if (_Count >= 2) { // ... with at least 2 elements _TRY_BEGIN - using _Ty = remove_reference_t<_Iter_ref_t<_NoThrowFwdIt>>; - auto _Ctor_fn = [](_Ty& _Obj) { _STD _Construct_in_place(_Obj); }; - _Static_partitioned_for_each2 _Operation{ - _Hw_threads, _Count, _Ctor_fn}; + using _Ty = remove_reference_t<_Iter_ref_t<_NoThrowFwdIt>>; + using _Ctor_fn = _Inplace_value_construct_fn<_Ty>; + _Static_partitioned_for_each2 _Operation{ + _Hw_threads, _Count, _Ctor_fn{}}; _Operation._Basis._Populate(_Operation._Team, _UFirst); _STD _Run_chunked_parallel_work(_Hw_threads, _Operation); return; @@ -5176,10 +5197,10 @@ _NoThrowFwdIt uninitialized_value_construct_n(_ExPo&&, _NoThrowFwdIt _First, con const size_t _Hw_threads = _CSTD __std_parallel_algorithms_hw_threads(); if (_Hw_threads > 1 && _Count >= 2) { // parallelize on multiprocessor machines with at least 2 elements _TRY_BEGIN - using _Ty = remove_reference_t<_Iter_ref_t<_NoThrowFwdIt>>; - auto _Ctor_fn = [](_Ty& _Obj) { _STD _Construct_in_place(_Obj); }; - _Static_partitioned_for_each2 _Operation{ - _Hw_threads, _Count, _Ctor_fn}; + using _Ty = remove_reference_t<_Iter_ref_t<_NoThrowFwdIt>>; + using _Ctor_fn = _Inplace_value_construct_fn<_Ty>; + _Static_partitioned_for_each2 _Operation{ + _Hw_threads, _Count, _Ctor_fn{}}; _STD _Seek_wrapped(_First, _Operation._Basis._Populate(_Operation._Team, _UFirst)); _STD _Run_chunked_parallel_work(_Hw_threads, _Operation); return _First; diff --git a/stl/inc/experimental/filesystem b/stl/inc/experimental/filesystem index bfc138fff..f5fb649b7 100644 --- a/stl/inc/experimental/filesystem +++ b/stl/inc/experimental/filesystem @@ -851,7 +851,7 @@ public: path& append(const basic_string<_Elem, _Traits, _Alloc>& _Str0) { // append arbitrary source string string_type _Str(_Str0.size(), L'\0'); // convert _Elem and '/' to '\' - _STD transform(_Str0.begin(), _Str0.end(), _Str.begin(), [](const _Elem _Ch) { + _STD transform(_Str0.begin(), _Str0.end(), _Str.begin(), [](const _Elem _Ch) _STATIC_CALL_OPERATOR { auto _Wch = static_cast(_Ch); if (_Wch == _FS_SLASH) { _Wch = _FS_PREF; diff --git a/stl/inc/filesystem b/stl/inc/filesystem index f41896c8e..f8bd45081 100644 --- a/stl/inc/filesystem +++ b/stl/inc/filesystem @@ -345,7 +345,7 @@ namespace filesystem { } struct _Is_slash_oper { // predicate testing if input is a preferred-separator or fallback-separator - _NODISCARD constexpr bool operator()(const wchar_t _Ch) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(const wchar_t _Ch) _CONST_CALL_OPERATOR { return _Ch == L'\\' || _Ch == L'/'; } }; @@ -4445,7 +4445,7 @@ template <> struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = filesystem::path; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const filesystem::path& _Path) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const filesystem::path& _Path) _CONST_CALL_OPERATOR noexcept { return _STD filesystem::hash_value(_Path); } }; diff --git a/stl/inc/format b/stl/inc/format index cd8a0747b..0ac31c5f6 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -703,6 +703,7 @@ public: explicit handle(_Ty& _Val) noexcept : _Ptr(_STD addressof(_Val)), _Format([](basic_format_parse_context<_CharType>& _Parse_ctx, _Context& _Format_ctx, const void* _Ptr) { + // TRANSITION, Clang 18, should be marked _STATIC_CALL_OPERATOR using _Td = remove_const_t<_Ty>; // doesn't drop const-qualifier per an unnumbered LWG issue using _Tq = conditional_t<_Formattable_with, const _Ty, _Ty>; @@ -1626,7 +1627,7 @@ inline constexpr bool _Is_signed_or_unsigned_large_integer_t = class _Width_checker { public: template - _NODISCARD constexpr unsigned long long operator()(const _Ty _Value) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr unsigned long long operator()(const _Ty _Value) _CONST_CALL_OPERATOR { if constexpr (_Is_signed_or_unsigned_large_integer_t<_Ty>) { if constexpr (is_signed_v<_Ty>) { if (_Value < 0) { @@ -1645,7 +1646,7 @@ public: class _Precision_checker { public: template - _NODISCARD constexpr unsigned long long operator()(const _Ty _Value) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr unsigned long long operator()(const _Ty _Value) _CONST_CALL_OPERATOR { if constexpr (_Is_signed_or_unsigned_large_integer_t<_Ty>) { if constexpr (is_signed_v<_Ty>) { if (_Value < 0) { diff --git a/stl/inc/memory b/stl/inc/memory index e199410fd..384a7b1e0 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -57,7 +57,8 @@ namespace ranges { template _Se, _No_throw_forward_iterator _Out, _No_throw_sentinel_for<_Out> _OSe> requires constructible_from, iter_reference_t<_It>> - uninitialized_copy_result<_It, _Out> operator()(_It _First1, _Se _Last1, _Out _First2, _OSe _Last2) const { + _STATIC_CALL_OPERATOR uninitialized_copy_result<_It, _Out> operator()( + _It _First1, _Se _Last1, _Out _First2, _OSe _Last2) _CONST_CALL_OPERATOR { _Adl_verify_range(_First1, _Last1); _Adl_verify_range(_First2, _Last2); auto _UResult = _Uninitialized_copy_unchecked(_Unwrap_iter<_Se>(_STD move(_First1)), @@ -71,8 +72,8 @@ namespace ranges { template requires constructible_from, range_reference_t<_Rng1>> - uninitialized_copy_result, borrowed_iterator_t<_Rng2>> operator()( - _Rng1&& _Range1, _Rng2&& _Range2) const { + _STATIC_CALL_OPERATOR uninitialized_copy_result, borrowed_iterator_t<_Rng2>> + operator()(_Rng1&& _Range1, _Rng2&& _Range2) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _UResult = _Uninitialized_copy_unchecked( _Unwrap_range_iter<_Rng1>(_STD move(_First1)), _Uend(_Range1), _Ubegin(_Range2), _Uend(_Range2)); @@ -172,8 +173,8 @@ namespace ranges { public: template _OSe> requires constructible_from, iter_reference_t<_It>> - uninitialized_copy_n_result<_It, _Out> operator()( - _It _First1, iter_difference_t<_It> _Count, _Out _First2, _OSe _Last2) const { + _STATIC_CALL_OPERATOR uninitialized_copy_n_result<_It, _Out> operator()( + _It _First1, iter_difference_t<_It> _Count, _Out _First2, _OSe _Last2) _CONST_CALL_OPERATOR { if (_Count <= 0) { return {_STD move(_First1), _STD move(_First2)}; } @@ -244,7 +245,8 @@ namespace ranges { template _Se, _No_throw_forward_iterator _Out, _No_throw_sentinel_for<_Out> _OSe> requires constructible_from, iter_rvalue_reference_t<_It>> - uninitialized_move_result<_It, _Out> operator()(_It _First1, _Se _Last1, _Out _First2, _OSe _Last2) const { + _STATIC_CALL_OPERATOR uninitialized_move_result<_It, _Out> operator()( + _It _First1, _Se _Last1, _Out _First2, _OSe _Last2) _CONST_CALL_OPERATOR { _Adl_verify_range(_First1, _Last1); _Adl_verify_range(_First2, _Last2); auto _UResult = _RANGES _Uninitialized_move_unchecked(_Unwrap_iter<_Se>(_STD move(_First1)), @@ -258,8 +260,8 @@ namespace ranges { template requires constructible_from, range_rvalue_reference_t<_Rng1>> - uninitialized_move_result, borrowed_iterator_t<_Rng2>> operator()( - _Rng1&& _Range1, _Rng2&& _Range2) const { + _STATIC_CALL_OPERATOR uninitialized_move_result, borrowed_iterator_t<_Rng2>> + operator()(_Rng1&& _Range1, _Rng2&& _Range2) _CONST_CALL_OPERATOR { auto _First1 = _RANGES begin(_Range1); auto _UResult = _RANGES _Uninitialized_move_unchecked( _Unwrap_range_iter<_Rng1>(_STD move(_First1)), _Uend(_Range1), _Ubegin(_Range2), _Uend(_Range2)); @@ -334,8 +336,8 @@ namespace ranges { public: template _OSe> requires constructible_from, iter_rvalue_reference_t<_It>> - uninitialized_move_n_result<_It, _Out> operator()( - _It _First1, iter_difference_t<_It> _Count, _Out _First2, _OSe _Last2) const { + _STATIC_CALL_OPERATOR uninitialized_move_n_result<_It, _Out> operator()( + _It _First1, iter_difference_t<_It> _Count, _Out _First2, _OSe _Last2) _CONST_CALL_OPERATOR { if (_Count <= 0) { return {_STD move(_First1), _STD move(_First2)}; } @@ -378,7 +380,7 @@ namespace ranges { public: template <_No_throw_forward_iterator _It, _No_throw_sentinel_for<_It> _Se, class _Ty> requires constructible_from, const _Ty&> - _It operator()(_It _First, _Se _Last, const _Ty& _Val) const { + _STATIC_CALL_OPERATOR _It operator()(_It _First, _Se _Last, const _Ty& _Val) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UResult = _Uninitialized_fill_unchecked( _Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last)), _Val); @@ -389,7 +391,8 @@ namespace ranges { template <_No_throw_forward_range _Rng, class _Ty> requires constructible_from, const _Ty&> - borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, const _Ty& _Val) const { + _STATIC_CALL_OPERATOR borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Val) _CONST_CALL_OPERATOR { return _Rewrap_iterator(_Range, _Uninitialized_fill_unchecked(_Ubegin(_Range), _Uend(_Range), _Val)); } @@ -483,7 +486,8 @@ namespace ranges { public: template <_No_throw_forward_iterator _It, class _Ty> requires constructible_from, const _Ty&> - _It operator()(_It _First, iter_difference_t<_It> _Count, const _Ty& _Val) const { + _STATIC_CALL_OPERATOR _It operator()( + _It _First, iter_difference_t<_It> _Count, const _Ty& _Val) _CONST_CALL_OPERATOR { if (_Count <= 0) { return _First; } @@ -517,14 +521,14 @@ namespace ranges { class _Construct_at_fn { public: - // clang-format off template requires requires(_Ty* _Ptr, _Types&&... _Args) { ::new (static_cast(_Ptr)) _Ty(static_cast<_Types&&>(_Args)...); // per LWG-3888 } - constexpr _Ty* operator()(_Ty* _Location, _Types&&... _Args) const - noexcept(noexcept(::new (static_cast(_Location)) - _Ty(_STD forward<_Types>(_Args)...))) /* strengthened */ { + _STATIC_CALL_OPERATOR constexpr _Ty* operator()(_Ty* _Location, _Types&&... _Args) _CONST_CALL_OPERATOR + // clang-format off + noexcept(noexcept( + ::new(static_cast(_Location)) _Ty(_STD forward<_Types>(_Args)...))) /* strengthened */ { // clang-format on #ifdef __EDG__ return _STD construct_at(_Location, _STD forward<_Types>(_Args)...); @@ -543,7 +547,7 @@ namespace ranges { class _Destroy_at_fn { public: template - constexpr void operator()(_Ty* const _Location) const noexcept { + _STATIC_CALL_OPERATOR constexpr void operator()(_Ty* const _Location) _CONST_CALL_OPERATOR noexcept { if constexpr (is_array_v<_Ty>) { (void) _RANGES _Destroy_unchecked(_RANGES begin(*_Location), _RANGES end(*_Location)); } else { @@ -587,7 +591,7 @@ namespace ranges { public: template <_No_throw_input_iterator _It, _No_throw_sentinel_for<_It> _Se> requires destructible> - constexpr _It operator()(_It _First, _Se _Last) const noexcept { + _STATIC_CALL_OPERATOR constexpr _It operator()(_It _First, _Se _Last) _CONST_CALL_OPERATOR noexcept { _Adl_verify_range(_First, _Last); _Seek_wrapped(_First, _RANGES _Destroy_unchecked(_Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last)))); @@ -596,7 +600,8 @@ namespace ranges { template <_No_throw_input_range _Rng> requires destructible> - constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range) const noexcept { + _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range) _CONST_CALL_OPERATOR noexcept { auto _First = _RANGES begin(_Range); _Seek_wrapped( _First, _RANGES _Destroy_unchecked(_Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range))); @@ -638,7 +643,8 @@ namespace ranges { public: template <_No_throw_input_iterator _It> requires destructible> - constexpr _It operator()(_It _First, const iter_difference_t<_It> _Count_raw) const noexcept { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, const iter_difference_t<_It> _Count_raw) _CONST_CALL_OPERATOR noexcept { _Algorithm_int_t> _Count = _Count_raw; if (_Count <= 0) { return _First; @@ -689,7 +695,7 @@ namespace ranges { public: template <_No_throw_forward_iterator _It, _No_throw_sentinel_for<_It> _Se> requires default_initializable> - _It operator()(_It _First, _Se _Last) const { + _STATIC_CALL_OPERATOR _It operator()(_It _First, _Se _Last) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UResult = _Uninitialized_default_construct_unchecked( _Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last))); @@ -700,7 +706,7 @@ namespace ranges { template <_No_throw_forward_range _Rng> requires default_initializable> - borrowed_iterator_t<_Rng> operator()(_Rng&& _Range) const { + _STATIC_CALL_OPERATOR borrowed_iterator_t<_Rng> operator()(_Rng&& _Range) _CONST_CALL_OPERATOR { auto _UResult = _Uninitialized_default_construct_unchecked(_Ubegin(_Range), _Uend(_Range)); return _Rewrap_iterator(_Range, _STD move(_UResult)); @@ -766,7 +772,7 @@ namespace ranges { public: template <_No_throw_forward_iterator _It> requires default_initializable> - _It operator()(_It _First, iter_difference_t<_It> _Count) const { + _STATIC_CALL_OPERATOR _It operator()(_It _First, iter_difference_t<_It> _Count) _CONST_CALL_OPERATOR { if (_Count <= 0) { return _First; } @@ -819,7 +825,7 @@ namespace ranges { public: template <_No_throw_forward_iterator _It, _No_throw_sentinel_for<_It> _Se> requires default_initializable> - _It operator()(_It _First, _Se _Last) const { + _STATIC_CALL_OPERATOR _It operator()(_It _First, _Se _Last) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); auto _UResult = _Uninitialized_value_construct_unchecked( _Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last))); @@ -830,7 +836,7 @@ namespace ranges { template <_No_throw_forward_range _Rng> requires default_initializable> - borrowed_iterator_t<_Rng> operator()(_Rng&& _Range) const { + _STATIC_CALL_OPERATOR borrowed_iterator_t<_Rng> operator()(_Rng&& _Range) _CONST_CALL_OPERATOR { auto _UResult = _Uninitialized_value_construct_unchecked(_Ubegin(_Range), _Uend(_Range)); return _Rewrap_iterator(_Range, _STD move(_UResult)); @@ -883,7 +889,7 @@ namespace ranges { public: template <_No_throw_forward_iterator _It> requires default_initializable> - _It operator()(_It _First, iter_difference_t<_It> _Count) const { + _STATIC_CALL_OPERATOR _It operator()(_It _First, iter_difference_t<_It> _Count) _CONST_CALL_OPERATOR { if (_Count <= 0) { return _First; } @@ -3863,7 +3869,7 @@ struct hash> { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = shared_ptr<_Ty>; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const shared_ptr<_Ty>& _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const shared_ptr<_Ty>& _Keyval) _CONST_CALL_OPERATOR noexcept { return hash::element_type*>()(_Keyval.get()); } }; diff --git a/stl/inc/memory_resource b/stl/inc/memory_resource index 05e77f606..dc66ebaa3 100644 --- a/stl/inc/memory_resource +++ b/stl/inc/memory_resource @@ -556,7 +556,8 @@ namespace pmr { const size_t _Size = (_STD max)(_Bytes + sizeof(void*), _Align); const auto _Log_of_size = static_cast(_Ceiling_of_log_2(_Size)); return {_STD lower_bound(_Pools.begin(), _Pools.end(), _Log_of_size, - [](const _Pool& _Al, const unsigned char _Log) { return _Al._Log_of_size < _Log; }), + [](const _Pool& _Al, const unsigned char _Log) + _STATIC_CALL_OPERATOR { return _Al._Log_of_size < _Log; }), _Log_of_size}; } diff --git a/stl/inc/mutex b/stl/inc/mutex index 415aa7928..2991a4f75 100644 --- a/stl/inc/mutex +++ b/stl/inc/mutex @@ -488,7 +488,7 @@ public: : _MyMutexes(_Mtxes...) {} // construct but don't lock ~scoped_lock() noexcept { - _STD apply([](_Mutexes&... _Mtxes) { (..., (void) _Mtxes.unlock()); }, _MyMutexes); + _STD apply([](_Mutexes&... _Mtxes) _STATIC_CALL_OPERATOR { (..., (void) _Mtxes.unlock()); }, _MyMutexes); } scoped_lock(const scoped_lock&) = delete; diff --git a/stl/inc/numeric b/stl/inc/numeric index 0018cd496..ffd6ba053 100644 --- a/stl/inc/numeric +++ b/stl/inc/numeric @@ -534,7 +534,8 @@ namespace ranges { public: template _Se, weakly_incrementable _Ty> requires indirectly_writable<_It, const _Ty&> - constexpr iota_result<_It, _Ty> operator()(_It _First, _Se _Last, _Ty _Val) const { + _STATIC_CALL_OPERATOR constexpr iota_result<_It, _Ty> operator()( + _It _First, _Se _Last, _Ty _Val) _CONST_CALL_OPERATOR { _Adl_verify_range(_First, _Last); _Seek_wrapped( _First, _Iota_impl(_Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last)), _Val)); @@ -542,7 +543,8 @@ namespace ranges { } template _Rng> - constexpr iota_result, _Ty> operator()(_Rng&& _Range, _Ty _Val) const { + _STATIC_CALL_OPERATOR constexpr iota_result, _Ty> operator()( + _Rng&& _Range, _Ty _Val) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); _Seek_wrapped(_First, _Iota_impl(_Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _Val)); return {_STD move(_First), _STD move(_Val)}; diff --git a/stl/inc/ranges b/stl/inc/ranges index 73b5324da..1632c6bfa 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -1054,7 +1054,7 @@ namespace ranges { namespace views { struct _Single_fn { template - _NODISCARD constexpr auto operator()(_Ty&& _Val) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR noexcept(noexcept(single_view>(_STD forward<_Ty>(_Val)))) requires requires { typename single_view>; @@ -1447,7 +1447,7 @@ namespace ranges { namespace views { struct _Iota_fn { template - _NODISCARD constexpr auto operator()(_Ty&& _Val) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR noexcept(noexcept(iota_view(static_cast<_Ty&&>(_Val)))) requires requires { iota_view(static_cast<_Ty&&>(_Val)); } { @@ -1455,7 +1455,7 @@ namespace ranges { } template - _NODISCARD constexpr auto operator()(_Ty1&& _Val1, _Ty2&& _Val2) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty1&& _Val1, _Ty2&& _Val2) _CONST_CALL_OPERATOR noexcept(noexcept(iota_view(static_cast<_Ty1&&>(_Val1), static_cast<_Ty2&&>(_Val2)))) requires requires { iota_view(static_cast<_Ty1&&>(_Val1), static_cast<_Ty2&&>(_Val2)); } { @@ -1702,7 +1702,7 @@ namespace ranges { namespace views { struct _Repeat_fn { template - _NODISCARD constexpr auto operator()(_Ty&& _Value) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Value) _CONST_CALL_OPERATOR noexcept(noexcept(repeat_view(_STD forward<_Ty>(_Value)))) requires requires { repeat_view(_STD forward<_Ty>(_Value)); } { @@ -1710,7 +1710,7 @@ namespace ranges { } template - _NODISCARD constexpr auto operator()(_Ty1&& _Val1, _Ty2&& _Val2) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty1&& _Val1, _Ty2&& _Val2) _CONST_CALL_OPERATOR noexcept(noexcept(repeat_view(_STD forward<_Ty1>(_Val1), _STD forward<_Ty2>(_Val2)))) requires requires { repeat_view(_STD forward<_Ty1>(_Val1), _STD forward<_Ty2>(_Val2)); } { @@ -1816,7 +1816,7 @@ namespace ranges { struct _Istream_fn { template requires _Istreamable<_Ty, _StreamTy> - _NODISCARD constexpr auto operator()(_StreamTy& _Stream) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_StreamTy& _Stream) _CONST_CALL_OPERATOR noexcept(is_nothrow_default_constructible_v<_Ty>) /* strengthened */ { return basic_istream_view<_Ty, typename _StreamTy::char_type, typename _StreamTy::traits_type>(_Stream); } @@ -2018,7 +2018,8 @@ namespace ranges { public: template requires (_Choice<_Rng>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Rng&& _Range) const noexcept(_Choice<_Rng>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR + noexcept(_Choice<_Rng>._No_throw) { constexpr _St _Strat = _Choice<_Rng>._Strategy; if constexpr (_Strat == _St::_View) { @@ -2154,7 +2155,8 @@ namespace ranges { public: template requires (_Choice<_Rng>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Rng&& _Range) const noexcept(_Choice<_Rng>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR + noexcept(_Choice<_Rng>._No_throw) { constexpr _St _Strat = _Choice<_Rng>._Strategy; if constexpr (_Strat == _St::_All) { return views::all(_STD forward<_Rng>(_Range)); @@ -2413,7 +2415,7 @@ namespace ranges { namespace views { struct _Filter_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Pr&& _Pred) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Pr&& _Pred) _CONST_CALL_OPERATOR noexcept(noexcept(filter_view(_STD forward<_Rng>(_Range), _STD forward<_Pr>(_Pred)))) requires requires { filter_view(static_cast<_Rng&&>(_Range), _STD forward<_Pr>(_Pred)); } { @@ -2422,7 +2424,7 @@ namespace ranges { template requires constructible_from, _Pr> - _NODISCARD constexpr auto operator()(_Pr&& _Pred) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Pr&& _Pred) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Pr>) { return _Range_closure<_Filter_fn, decay_t<_Pr>>{_STD forward<_Pr>(_Pred)}; } @@ -2842,7 +2844,7 @@ namespace ranges { namespace views { struct _Transform_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Fn _Fun) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Fn _Fun) _CONST_CALL_OPERATOR noexcept(noexcept(transform_view(_STD forward<_Rng>(_Range), _STD move(_Fun)))) requires requires { transform_view(static_cast<_Rng&&>(_Range), _STD move(_Fun)); } { @@ -2851,7 +2853,7 @@ namespace ranges { template requires constructible_from, _Fn> - _NODISCARD constexpr auto operator()(_Fn&& _Fun) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Fn&& _Fun) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Fn>) { return _Range_closure<_Transform_fn, decay_t<_Fn>>{_STD forward<_Fn>(_Fun)}; } @@ -3103,8 +3105,8 @@ namespace ranges { public: template - _NODISCARD constexpr auto operator()(_Rng&& _Range, range_difference_t<_Rng> _Count) const - noexcept(_Choice<_Rng>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, range_difference_t<_Rng> _Count) _CONST_CALL_OPERATOR noexcept(_Choice<_Rng>._No_throw) { constexpr _St _Strat = _Choice<_Rng>._Strategy; if constexpr (_Strat == _St::_Empty) { @@ -3142,7 +3144,7 @@ namespace ranges { template requires constructible_from, _Ty> - _NODISCARD constexpr auto operator()(_Ty&& _Length) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Length) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Ty>) { return _Range_closure<_Take_fn, decay_t<_Ty>>{_STD forward<_Ty>(_Length)}; } @@ -3302,7 +3304,7 @@ namespace ranges { namespace views { struct _Take_while_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Pr _Pred) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Pr _Pred) _CONST_CALL_OPERATOR noexcept(noexcept(take_while_view(_STD forward<_Rng>(_Range), _STD move(_Pred)))) requires requires { take_while_view(static_cast<_Rng&&>(_Range), _STD move(_Pred)); } { @@ -3311,7 +3313,7 @@ namespace ranges { template requires constructible_from, _Pr> - _NODISCARD constexpr auto operator()(_Pr&& _Pred) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Pr&& _Pred) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Pr>) { return _Range_closure<_Take_while_fn, decay_t<_Pr>>{_STD forward<_Pr>(_Pred)}; } @@ -3506,8 +3508,8 @@ namespace ranges { public: template - _NODISCARD constexpr auto operator()(_Rng&& _Range, range_difference_t<_Rng> _Count) const - noexcept(_Choice<_Rng>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, range_difference_t<_Rng> _Count) _CONST_CALL_OPERATOR noexcept(_Choice<_Rng>._No_throw) { constexpr _St _Strat = _Choice<_Rng>._Strategy; if constexpr (_Strat == _St::_Empty) { @@ -3548,7 +3550,7 @@ namespace ranges { template requires constructible_from, _Ty> - _NODISCARD constexpr auto operator()(_Ty&& _Length) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Length) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Ty>) { return _Range_closure<_Drop_fn, decay_t<_Ty>>{_STD forward<_Ty>(_Length)}; } @@ -3627,7 +3629,7 @@ namespace ranges { namespace views { struct _Drop_while_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Pr _Pred) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Pr _Pred) _CONST_CALL_OPERATOR noexcept(noexcept(drop_while_view(_STD forward<_Rng>(_Range), _STD move(_Pred)))) requires requires { drop_while_view(static_cast<_Rng&&>(_Range), _STD move(_Pred)); } { @@ -3636,7 +3638,7 @@ namespace ranges { template requires constructible_from, _Pr> - _NODISCARD constexpr auto operator()(_Pr&& _Pred) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Pr&& _Pred) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Pr>) { return _Range_closure<_Drop_while_fn, decay_t<_Pr>>{_STD forward<_Pr>(_Pred)}; } @@ -4060,7 +4062,7 @@ namespace ranges { class _Join_fn : public _Pipe::_Base<_Join_fn> { public: template - _NODISCARD constexpr auto operator()(_Rng&& _Range) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR noexcept(noexcept(join_view>{_STD forward<_Rng>(_Range)})) requires requires { join_view>{static_cast<_Rng&&>(_Range)}; } { @@ -4304,7 +4306,7 @@ namespace ranges { _NODISCARD constexpr decltype(auto) operator*() const { using _Ref = common_reference_t, iter_reference_t<_PatternIter>>; - return _Visit_inner_it<_Ref>([](auto&& _It) -> _Ref { return *_It; }); + return _Visit_inner_it<_Ref>([](auto&& _It) _STATIC_CALL_OPERATOR -> _Ref { return *_It; }); } constexpr _Iterator& operator++() { @@ -4593,7 +4595,8 @@ namespace ranges { namespace views { struct _Join_with_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Pat&& _Pattern) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, _Pat&& _Pattern) _CONST_CALL_OPERATOR noexcept(noexcept(join_with_view(_STD forward<_Rng>(_Range), _STD forward<_Pat>(_Pattern)))) requires requires { join_with_view(_STD forward<_Rng>(_Range), _STD forward<_Pat>(_Pattern)); } { @@ -4602,7 +4605,7 @@ namespace ranges { template requires constructible_from, _Delim> - _NODISCARD constexpr auto operator()(_Delim&& _Delimiter) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Delim&& _Delimiter) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Delim>) { return _Range_closure<_Join_with_fn, decay_t<_Delim>>{_STD forward<_Delim>(_Delimiter)}; } @@ -5010,7 +5013,8 @@ namespace ranges { namespace views { struct _Lazy_split_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Pat&& _Pattern) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, _Pat&& _Pattern) _CONST_CALL_OPERATOR noexcept(noexcept(lazy_split_view(_STD forward<_Rng>(_Range), _STD forward<_Pat>(_Pattern)))) requires requires { lazy_split_view(static_cast<_Rng&&>(_Range), static_cast<_Pat&&>(_Pattern)); } { @@ -5019,7 +5023,7 @@ namespace ranges { template requires constructible_from, _Delim> - _NODISCARD constexpr auto operator()(_Delim&& _Delimiter) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Delim&& _Delimiter) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Delim>) { return _Range_closure<_Lazy_split_fn, decay_t<_Delim>>{_STD forward<_Delim>(_Delimiter)}; } @@ -5195,7 +5199,8 @@ namespace ranges { namespace views { struct _Split_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Pat&& _Pattern) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, _Pat&& _Pattern) _CONST_CALL_OPERATOR noexcept(noexcept(split_view(_STD forward<_Rng>(_Range), _STD forward<_Pat>(_Pattern)))) requires requires { split_view(static_cast<_Rng&&>(_Range), static_cast<_Pat&&>(_Pattern)); } { @@ -5204,7 +5209,7 @@ namespace ranges { template requires constructible_from, _Delim> - _NODISCARD constexpr auto operator()(_Delim&& _Delimiter) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Delim&& _Delimiter) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Delim>) { return _Range_closure<_Split_fn, decay_t<_Delim>>{_STD forward<_Delim>(_Delimiter)}; } @@ -5241,8 +5246,8 @@ namespace ranges { public: template requires (input_or_output_iterator> && _Choice<_It>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_It&& _First, const iter_difference_t> _Count) const - noexcept(_Choice<_It>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_It&& _First, + const iter_difference_t> _Count) _CONST_CALL_OPERATOR noexcept(_Choice<_It>._No_throw) { _STL_ASSERT(_Count >= 0, "The size passed to views::counted must be non-negative"); constexpr _St _Strat = _Choice<_It>._Strategy; @@ -5368,7 +5373,8 @@ namespace ranges { public: template requires (_Choice<_Rng>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Rng&& _Range) const noexcept(_Choice<_Rng>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR + noexcept(_Choice<_Rng>._No_throw) { constexpr _St _Strat = _Choice<_Rng>._Strategy; if constexpr (_Strat == _St::_All) { @@ -5522,7 +5528,8 @@ namespace ranges { public: template requires (_Choice<_Rng>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Rng&& _Range) const noexcept(_Choice<_Rng>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR + noexcept(_Choice<_Rng>._No_throw) { constexpr _St _Strat = _Choice<_Rng>._Strategy; if constexpr (_Strat == _St::_Base) { @@ -5660,7 +5667,8 @@ namespace ranges { public: template requires (_Choice<_Rng>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Rng&& _Range) const noexcept(_Choice<_Rng>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR + noexcept(_Choice<_Rng>._No_throw) { using _Ty = remove_cvref_t<_Rng>; constexpr _St _Strat = _Choice<_Rng>._Strategy; @@ -6095,7 +6103,7 @@ namespace ranges { class _Elements_fn : public _Pipe::_Base<_Elements_fn<_Index>> { public: template - _NODISCARD constexpr auto operator()(_Rng&& _Range) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR noexcept(noexcept(elements_view, _Index>{_STD forward<_Rng>(_Range)})) requires requires { elements_view, _Index>{static_cast<_Rng&&>(_Range)}; } { @@ -6439,7 +6447,7 @@ namespace ranges { class _Enumerate_fn : public _Pipe::_Base<_Enumerate_fn> { public: template - _NODISCARD constexpr auto operator()(_Rng&& _Range) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR noexcept(noexcept(enumerate_view>{_STD forward<_Rng>(_Range)})) requires requires { enumerate_view>{_STD forward<_Rng>(_Range)}; } { @@ -7038,7 +7046,8 @@ namespace ranges { namespace views { struct _Chunk_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, const range_difference_t<_Rng> _Count) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, const range_difference_t<_Rng> _Count) _CONST_CALL_OPERATOR noexcept(noexcept(chunk_view(_STD forward<_Rng>(_Range), _Count))) requires requires { chunk_view(_STD forward<_Rng>(_Range), _Count); } { @@ -7047,7 +7056,7 @@ namespace ranges { template requires constructible_from, _Ty> - _NODISCARD constexpr auto operator()(_Ty&& _Count) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Count) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Ty>) { return _Range_closure<_Chunk_fn, decay_t<_Ty>>{_STD forward<_Ty>(_Count)}; } @@ -7436,7 +7445,8 @@ namespace ranges { namespace views { struct _Slide_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, const range_difference_t<_Rng> _Count) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, const range_difference_t<_Rng> _Count) _CONST_CALL_OPERATOR noexcept(noexcept(slide_view(_STD forward<_Rng>(_Range), _Count))) requires requires { slide_view(_STD forward<_Rng>(_Range), _Count); } { @@ -7445,7 +7455,7 @@ namespace ranges { template requires constructible_from, _Ty> - _NODISCARD constexpr auto operator()(_Ty&& _Count) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Count) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Ty>) { return _Range_closure<_Slide_fn, decay_t<_Ty>>{_STD forward<_Ty>(_Count)}; } @@ -7638,7 +7648,7 @@ namespace ranges { namespace views { struct _Chunk_by_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Pr&& _Pred) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Pr&& _Pred) _CONST_CALL_OPERATOR noexcept(noexcept(chunk_by_view(_STD forward<_Rng>(_Range), _STD forward<_Pr>(_Pred)))) requires requires { chunk_by_view(_STD forward<_Rng>(_Range), _STD forward<_Pr>(_Pred)); } { @@ -7647,7 +7657,7 @@ namespace ranges { template requires constructible_from, _Pr> - _NODISCARD constexpr auto operator()(_Pr&& _Pred) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Pr&& _Pred) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Pr>) { return _Range_closure<_Chunk_by_fn, decay_t<_Pr>>{_STD forward<_Pr>(_Pred)}; } @@ -8033,7 +8043,8 @@ namespace ranges { namespace views { struct _Stride_fn { template - _NODISCARD constexpr auto operator()(_Rng&& _Range, const range_difference_t<_Rng> _Stride) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, const range_difference_t<_Rng> _Stride) _CONST_CALL_OPERATOR noexcept(noexcept(stride_view(_STD forward<_Rng>(_Range), _Stride))) requires requires { stride_view(_STD forward<_Rng>(_Range), _Stride); } { @@ -8042,7 +8053,7 @@ namespace ranges { template requires constructible_from, _Ty> - _NODISCARD constexpr auto operator()(_Ty&& _Stride) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Stride) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Ty>) { return _Range_closure<_Stride_fn, decay_t<_Ty>>{_STD forward<_Ty>(_Stride)}; } @@ -8200,12 +8211,14 @@ namespace ranges { noexcept((noexcept(*(_STD declval>&>())) && ...)) /* strengthened */ { return _Tuple_transform( - [](auto& _Itr) noexcept(noexcept(*_Itr)) -> decltype(auto) { return *_Itr; }, _Current); + [](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(*_Itr)) -> decltype(auto) { return *_Itr; }, + _Current); } - constexpr _Iterator& operator++() noexcept(noexcept( - _Tuple_for_each([](auto& _Itr) noexcept(noexcept(++_Itr)) { ++_Itr; }, _Current))) /* strengthened */ { - _Tuple_for_each([](auto& _Itr) noexcept(noexcept(++_Itr)) { ++_Itr; }, _Current); + constexpr _Iterator& operator++() noexcept( + noexcept(_Tuple_for_each([](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(++_Itr)) { ++_Itr; }, + _Current))) /* strengthened */ { + _Tuple_for_each([](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(++_Itr)) { ++_Itr; }, _Current); return *this; } @@ -8223,11 +8236,11 @@ namespace ranges { return _Temp; } - constexpr _Iterator& operator--() noexcept(noexcept( - _Tuple_for_each([](auto& _Itr) noexcept(noexcept(--_Itr)) { --_Itr; }, _Current))) // strengthened + constexpr _Iterator& operator--() noexcept(noexcept(_Tuple_for_each( + [](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(--_Itr)) { --_Itr; }, _Current))) // strengthened requires _All_bidirectional<_IsConst, _ViewTypes...> { - _Tuple_for_each([](auto& _Itr) noexcept(noexcept(--_Itr)) { --_Itr; }, _Current); + _Tuple_for_each([](auto& _Itr) _STATIC_CALL_OPERATOR noexcept(noexcept(--_Itr)) { --_Itr; }, _Current); return *this; } @@ -8512,7 +8525,7 @@ namespace ranges { private: _NODISCARD static constexpr auto _Size_closure() noexcept { - return [](auto... _Sizes) noexcept { + return [](auto... _Sizes) _STATIC_CALL_OPERATOR noexcept { using _Common_unsigned_type = _Make_unsigned_like_t>; return (_RANGES min)({static_cast<_Common_unsigned_type>(_Sizes)...}); }; @@ -8555,7 +8568,8 @@ namespace ranges { public: template - _NODISCARD constexpr auto operator()(_Types&&... _Args) const noexcept(_Is_invocation_noexcept<_Types...>()) + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Types&&... _Args) _CONST_CALL_OPERATOR + noexcept(_Is_invocation_noexcept<_Types...>()) requires (sizeof...(_Types) == 0) || requires { zip_view...>(_STD forward<_Types>(_Args)...); } { @@ -8890,16 +8904,16 @@ namespace ranges { struct _Zip_transform_fn { private: template - static constexpr bool _Is_invocation_noexcept = []() noexcept { + _NODISCARD static consteval bool _Is_invocation_noexcept() { if constexpr (sizeof...(_Types) == 0) { return true; } else { return noexcept(zip_transform_view(_STD declval<_Func>(), _STD declval<_Types>()...)); } - }(); + } template - static constexpr bool _Enable_cpo = []() noexcept { + _NODISCARD static consteval bool _Enable_cpo() { if constexpr (sizeof...(_Types) == 0) { // This is a more efficient implementation of the CPO requirements listed in // N4950 [range.zip.transform.overview]/2.1.1. @@ -8914,13 +8928,14 @@ namespace ranges { zip_transform_view(_STD forward<_Func>(_Function), _STD forward<_Types>(_Args)...); }; } - }(); + } public: template - requires _Enable_cpo<_Func, _Types...> - _NODISCARD constexpr auto operator()(_Func&& _Function, _Types&&... _Args) const - noexcept(_Is_invocation_noexcept<_Func, _Types...>) /* strengthened */ { + requires (_Enable_cpo<_Func, _Types...>()) + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Func&& _Function, _Types&&... _Args) _CONST_CALL_OPERATOR + noexcept(_Is_invocation_noexcept<_Func, _Types...>()) /* strengthened */ { if constexpr (sizeof...(_Types) == 0) { using _Decayed_func = decay_t<_Func>; return empty_view>>{}; @@ -9048,7 +9063,8 @@ namespace ranges { : _Iterator(_Other, make_index_sequence<_Nx>{}) {} _NODISCARD constexpr auto operator*() const { - return _RANGES _Tuple_transform([](auto& _It) -> decltype(auto) { return *_It; }, _Current); + return _RANGES _Tuple_transform( + [](auto& _It) _STATIC_CALL_OPERATOR -> decltype(auto) { return *_It; }, _Current); } constexpr _Iterator& operator++() noexcept(noexcept(++_Current.front())) /* strengthened */ { @@ -9360,7 +9376,7 @@ namespace ranges { class _Adjacent_fn : public _Pipe::_Base<_Adjacent_fn<_Nx>> { public: template - _NODISCARD constexpr auto operator()(_Rng&& _Range) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR noexcept(noexcept(adjacent_view, _Nx>{_STD forward<_Rng>(_Range)})) requires requires { adjacent_view, _Nx>{_STD forward<_Rng>(_Range)}; } { @@ -9368,7 +9384,7 @@ namespace ranges { } template - _NODISCARD constexpr auto operator()(_Rng&&) const noexcept + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&&) _CONST_CALL_OPERATOR noexcept requires (_Nx == 0) { return empty_view>{}; @@ -9705,7 +9721,7 @@ namespace ranges { class _Adjacent_transform_fn { public: template - _NODISCARD constexpr auto operator()(_Rng&&, _Fn&& _Func) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&&, _Fn&& _Func) _CONST_CALL_OPERATOR noexcept(noexcept(views::zip_transform(_STD forward<_Fn>(_Func)))) requires (_Nx == 0) && requires { views::zip_transform(_STD forward<_Fn>(_Func)); } { @@ -9713,7 +9729,7 @@ namespace ranges { } template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Fn&& _Func) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range, _Fn&& _Func) _CONST_CALL_OPERATOR noexcept(noexcept(adjacent_transform_view, decay_t<_Fn>, _Nx>( _STD forward<_Rng>(_Range), _STD forward<_Fn>(_Func)))) requires requires { @@ -9727,7 +9743,7 @@ namespace ranges { template requires constructible_from, _Fn> - _NODISCARD constexpr auto operator()(_Fn&& _Func) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Fn&& _Func) _CONST_CALL_OPERATOR noexcept(is_nothrow_constructible_v, _Fn>) { return _Range_closure<_Adjacent_transform_fn, decay_t<_Fn>>{_STD forward<_Fn>(_Func)}; } @@ -9976,7 +9992,8 @@ namespace ranges { : _Parent(_It._Parent), _Current(_STD move(_It._Current)) {} _NODISCARD constexpr auto operator*() const { - return _RANGES _Tuple_transform([](auto& _It) -> decltype(auto) { return *_It; }, _Current); + return _RANGES _Tuple_transform( + [](auto& _It) _STATIC_CALL_OPERATOR -> decltype(auto) { return *_It; }, _Current); } constexpr _Iterator& operator++() { @@ -10245,12 +10262,12 @@ namespace ranges { namespace views { class _Cartesian_product_fn { public: - _NODISCARD constexpr auto operator()() const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()() _CONST_CALL_OPERATOR noexcept { return views::single(tuple{}); } template - _NODISCARD constexpr auto operator()(_Rngs&&... _Ranges) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rngs&&... _Ranges) _CONST_CALL_OPERATOR noexcept(noexcept(cartesian_product_view...>{_STD forward<_Rngs>(_Ranges)...})) requires requires { cartesian_product_view...>{_STD forward<_Rngs>(_Ranges)...}; } { @@ -10331,7 +10348,7 @@ namespace ranges { _RANGES copy(_Range, _Container_inserter>(_Cont)); return _Cont; } else if constexpr (!_Ref_converts<_Rng, _Container> && input_range>) { - const auto _Xform = [](auto&& _Elem) { + const auto _Xform = [](auto&& _Elem) _STATIC_CALL_OPERATOR { return _RANGES to>(_STD forward(_Elem)); }; return _RANGES to<_Container>(views::transform(_Range, _Xform), _STD forward<_Types>(_Args)...); @@ -10348,7 +10365,8 @@ namespace ranges { _STL_INTERNAL_STATIC_ASSERT(!view<_Container>); template - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Types&&... _Args) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, _Types&&... _Args) _CONST_CALL_OPERATOR requires requires { _RANGES to<_Container>(_STD forward<_Rng>(_Range), _STD forward<_Types>(_Args)...); } { return _RANGES to<_Container>(_STD forward<_Rng>(_Range), _STD forward<_Types>(_Args)...); @@ -10406,7 +10424,8 @@ namespace ranges { struct _To_template_fn { template ())>> - _NODISCARD constexpr auto operator()(_Rng&& _Range, _Types&&... _Args) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()( + _Rng&& _Range, _Types&&... _Args) _CONST_CALL_OPERATOR { return _RANGES to<_Deduced>(_STD forward<_Rng>(_Range), _STD forward<_Types>(_Args)...); } }; diff --git a/stl/inc/regex b/stl/inc/regex index d39b81fc8..db4f14fee 100644 --- a/stl/inc/regex +++ b/stl/inc/regex @@ -179,7 +179,7 @@ template struct _Char_traits_eq { using _Elem = typename _Traits::char_type; - bool operator()(_Elem _Left, _Elem _Right) const noexcept { + _STATIC_CALL_OPERATOR bool operator()(_Elem _Left, _Elem _Right) _CONST_CALL_OPERATOR noexcept { return _Traits::eq(_Left, _Right); } }; @@ -188,7 +188,7 @@ template struct _Char_traits_lt { using _Elem = typename _Traits::char_type; - bool operator()(_Elem _Left, _Elem _Right) const noexcept { + _STATIC_CALL_OPERATOR bool operator()(_Elem _Left, _Elem _Right) _CONST_CALL_OPERATOR noexcept { return _Traits::lt(_Left, _Right); } }; @@ -210,7 +210,7 @@ struct _Lex_compare_memcmp_classify_pred<_Elem, _Elem, _Char_traits_lt struct _Cmp_cs { // functor to compare two character values for equality using _Elem = typename _RxTraits::char_type; - bool operator()(_Elem _Ex1, _Elem _Ex2) { + _STATIC_CALL_OPERATOR bool operator()(_Elem _Ex1, _Elem _Ex2) _CONST_CALL_OPERATOR { return _Ex1 == _Ex2; } }; diff --git a/stl/inc/stacktrace b/stl/inc/stacktrace index ff20cfb41..9d84b3373 100644 --- a/stl/inc/stacktrace +++ b/stl/inc/stacktrace @@ -381,7 +381,7 @@ template <> struct hash { // This is a C++23 feature, so argument_type and result_type are omitted. - _NODISCARD size_t operator()(const stacktrace_entry& _Val) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const stacktrace_entry& _Val) _CONST_CALL_OPERATOR noexcept { return _Hash_representation(_Val.native_handle()); } }; @@ -390,7 +390,8 @@ template struct hash> { // This is a C++23 feature, so argument_type and result_type are omitted. - _NODISCARD size_t operator()(const basic_stacktrace<_Alloc>& _Val) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()( + const basic_stacktrace<_Alloc>& _Val) _CONST_CALL_OPERATOR noexcept { return _Val._Get_hash(); } }; diff --git a/stl/inc/system_error b/stl/inc/system_error index 11d180314..e422b4735 100644 --- a/stl/inc/system_error +++ b/stl/inc/system_error @@ -443,7 +443,7 @@ struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = error_code; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const error_code& _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const error_code& _Keyval) _CONST_CALL_OPERATOR noexcept { return hash{}(_Keyval.value()); } }; @@ -453,7 +453,7 @@ struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = error_condition; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const error_condition& _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const error_condition& _Keyval) _CONST_CALL_OPERATOR noexcept { return hash{}(_Keyval.value()); } }; diff --git a/stl/inc/thread b/stl/inc/thread index b3f191598..8bd1f188f 100644 --- a/stl/inc/thread +++ b/stl/inc/thread @@ -329,7 +329,7 @@ struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = thread::id; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const thread::id _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const thread::id _Keyval) _CONST_CALL_OPERATOR noexcept { return _Hash_representation(_Keyval._Id); } }; diff --git a/stl/inc/type_traits b/stl/inc/type_traits index 2fde17906..cd8400763 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -2366,7 +2366,7 @@ struct _Conditionally_enabled_hash { // conditionally enabled hash base using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = _Kty; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const _Kty& _Keyval) const + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const _Kty& _Keyval) _CONST_CALL_OPERATOR noexcept(noexcept(hash<_Kty>::_Do_hash(_Keyval))) /* strengthened */ { return hash<_Kty>::_Do_hash(_Keyval); } @@ -2394,7 +2394,7 @@ template <> struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = float; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const float _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const float _Keyval) _CONST_CALL_OPERATOR noexcept { return _Hash_representation(_Keyval == 0.0F ? 0.0F : _Keyval); // map -0 to 0 } }; @@ -2403,7 +2403,7 @@ template <> struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = double; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const double _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const double _Keyval) _CONST_CALL_OPERATOR noexcept { return _Hash_representation(_Keyval == 0.0 ? 0.0 : _Keyval); // map -0 to 0 } }; @@ -2412,7 +2412,7 @@ template <> struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = long double; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const long double _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const long double _Keyval) _CONST_CALL_OPERATOR noexcept { return _Hash_representation(_Keyval == 0.0L ? 0.0L : _Keyval); // map -0 to 0 } }; @@ -2421,7 +2421,7 @@ template <> struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = nullptr_t; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(nullptr_t) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(nullptr_t) _CONST_CALL_OPERATOR noexcept { void* _Null{}; return _Hash_representation(_Null); } diff --git a/stl/inc/typeindex b/stl/inc/typeindex index 3e1effeaf..7f74cde2a 100644 --- a/stl/inc/typeindex +++ b/stl/inc/typeindex @@ -81,7 +81,7 @@ struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = type_index; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const type_index& _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(const type_index& _Keyval) _CONST_CALL_OPERATOR noexcept { return _Keyval.hash_code(); } }; diff --git a/stl/inc/variant b/stl/inc/variant index ea63c0bdd..a8b7d80c1 100644 --- a/stl/inc/variant +++ b/stl/inc/variant @@ -1689,7 +1689,7 @@ _CONSTEXPR20 void swap(variant<_Types...>& _Left, variant<_Types...>& _Right) no struct _Variant_hash_visitor { // visitation function for hashing variants template - _NODISCARD size_t operator()(_Tagged _Obj) const + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(_Tagged _Obj) _CONST_CALL_OPERATOR noexcept(disjunction_v, is_nothrow_invocable, const _Ty&>>) { // hash contained value _Obj if constexpr (_Idx == variant_npos) { // hash a valueless variant @@ -1715,7 +1715,7 @@ struct hash { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = monostate; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(monostate) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()(monostate) _CONST_CALL_OPERATOR noexcept { return 1729; // Arbitrary value } }; diff --git a/stl/inc/vector b/stl/inc/vector index 95426be8e..0fe611ef9 100644 --- a/stl/inc/vector +++ b/stl/inc/vector @@ -2259,7 +2259,8 @@ _NODISCARD bool operator!=(const vector<_Ty, _Alloc>& _Left, const vector<_Ty, _ template struct _Vbase_compare_three_way { - _NODISCARD constexpr _Ret operator()(const _Vbase _Left, const _Vbase _Right) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _Ret operator()( + const _Vbase _Left, const _Vbase _Right) _CONST_CALL_OPERATOR noexcept { const _Vbase _Differing_bits = _Left ^ _Right; if (_Differing_bits == 0) { // improves _Countr_zero codegen below @@ -3563,7 +3564,8 @@ struct hash> { using _ARGUMENT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = vector; using _RESULT_TYPE_NAME _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS = size_t; - _NODISCARD size_t operator()(const vector& _Keyval) const noexcept { + _NODISCARD _STATIC_CALL_OPERATOR size_t operator()( + const vector& _Keyval) _CONST_CALL_OPERATOR noexcept { return _Hash_array_representation(_Keyval._Myvec.data(), _Keyval._Myvec.size()); } }; diff --git a/stl/inc/xstring b/stl/inc/xstring index 2815ac309..f1c3ee4ae 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -3319,7 +3319,7 @@ public: return _Reallocate_grow_by( _Count, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const _Elem* const _Ptr, - const size_type _Count) { + const size_type _Count) _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Old_size); _Traits::copy(_New_ptr + _Old_size, _Ptr, _Count); _Traits::assign(_New_ptr[_Old_size + _Count], _Elem()); @@ -3346,7 +3346,7 @@ public: return _Reallocate_grow_by( _Count, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Count, - const _Elem _Ch) { + const _Elem _Ch) _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Old_size); _Traits::assign(_New_ptr + _Old_size, _Count, _Ch); _Traits::assign(_New_ptr[_Old_size + _Count], _Elem()); @@ -3424,7 +3424,7 @@ public: return _Reallocate_for( _Count, - [](_Elem* const _New_ptr, const size_type _Count, const _Elem* const _Ptr) { + [](_Elem* const _New_ptr, const size_type _Count, const _Elem* const _Ptr) _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Ptr, _Count); _Traits::assign(_New_ptr[_Count], _Elem()); }, @@ -3448,7 +3448,7 @@ public: return _Reallocate_for( _Count, - [](_Elem* const _New_ptr, const size_type _Count, const _Elem _Ch) { + [](_Elem* const _New_ptr, const size_type _Count, const _Elem _Ch) _STATIC_CALL_OPERATOR { _Traits::assign(_New_ptr, _Count, _Ch); _Traits::assign(_New_ptr[_Count], _Elem()); }, @@ -3564,7 +3564,7 @@ public: return _Reallocate_grow_by( _Count, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Off, - const _Elem* const _Ptr, const size_type _Count) { + const _Elem* const _Ptr, const size_type _Count) _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Off); _Traits::copy(_New_ptr + _Off, _Ptr, _Count); _Traits::copy(_New_ptr + _Off + _Count, _Old_ptr + _Off, _Old_size - _Off + 1); @@ -3595,7 +3595,7 @@ public: return _Reallocate_grow_by( _Count, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Off, - const size_type _Count, const _Elem _Ch) { + const size_type _Count, const _Elem _Ch) _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Off); _Traits::assign(_New_ptr + _Off, _Count, _Ch); _Traits::copy(_New_ptr + _Off + _Count, _Old_ptr + _Off, _Old_size - _Off + 1); @@ -3807,7 +3807,7 @@ public: return _Reallocate_grow_by( _Growth, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Off, - const size_type _Nx, const _Elem* const _Ptr, const size_type _Count) { + const size_type _Nx, const _Elem* const _Ptr, const size_type _Count) _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Off); _Traits::copy(_New_ptr + _Off, _Ptr, _Count); _Traits::copy(_New_ptr + _Off + _Count, _Old_ptr + _Off + _Nx, _Old_size - _Nx - _Off + 1); @@ -3847,7 +3847,7 @@ public: return _Reallocate_grow_by( _Count - _Nx, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const size_type _Off, - const size_type _Nx, const size_type _Count, const _Elem _Ch) { + const size_type _Nx, const size_type _Count, const _Elem _Ch) _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Off); _Traits::assign(_New_ptr + _Off, _Count, _Ch); _Traits::copy(_New_ptr + _Off + _Count, _Old_ptr + _Off + _Nx, _Old_size - _Nx - _Off + 1); @@ -4096,11 +4096,12 @@ public: _Reallocate_grow_by( 1, - [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const _Elem _Ch) { - _Traits::copy(_New_ptr, _Old_ptr, _Old_size); - _Traits::assign(_New_ptr[_Old_size], _Ch); - _Traits::assign(_New_ptr[_Old_size + 1], _Elem()); - }, + [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size, const _Elem _Ch) + _STATIC_CALL_OPERATOR { + _Traits::copy(_New_ptr, _Old_ptr, _Old_size); + _Traits::assign(_New_ptr[_Old_size], _Ch); + _Traits::assign(_New_ptr[_Old_size + 1], _Elem()); + }, _Ch); } @@ -4195,9 +4196,8 @@ public: (_CRT_GUARDOVERFLOW const size_type _New_size, _Operation _Op) { if (_Mypair._Myval2._Myres < _New_size) { _Reallocate_grow_by(_New_size - _Mypair._Myval2._Mysize, - [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) { - _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); - }); + [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) + _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); } else { _ASAN_STRING_MODIFY(*this, _Mypair._Myval2._Mysize, _New_size); _Mypair._Myval2._Mysize = _New_size; @@ -4233,10 +4233,9 @@ public: } const size_type _Old_size = _Mypair._Myval2._Mysize; - _Reallocate_grow_by( - _Newcap - _Old_size, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) { - _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); - }); + _Reallocate_grow_by(_Newcap - _Old_size, + [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) + _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); _Mypair._Myval2._Mysize = _Old_size; } @@ -4258,10 +4257,9 @@ public: if (_Mypair._Myval2._Myres < _Newcap) { // reallocate to grow const size_type _Old_size = _Mypair._Myval2._Mysize; - _Reallocate_grow_by( - _Newcap - _Old_size, [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) { - _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); - }); + _Reallocate_grow_by(_Newcap - _Old_size, + [](_Elem* const _New_ptr, const _Elem* const _Old_ptr, const size_type _Old_size) + _STATIC_CALL_OPERATOR { _Traits::copy(_New_ptr, _Old_ptr, _Old_size + 1); }); _Mypair._Myval2._Mysize = _Old_size; return; diff --git a/stl/inc/xutility b/stl/inc/xutility index 308d83d0d..c0f37e2b5 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -637,7 +637,8 @@ namespace ranges { public: template requires (_Choice<_Ty>._Strategy != _St::_None) - _NODISCARD constexpr decltype(auto) operator()(_Ty && _Val) const noexcept(_Choice<_Ty>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr decltype(auto) operator()(_Ty && _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty>._No_throw) { constexpr _St _Strat = _Choice<_Ty>._Strategy; if constexpr (_Strat == _St::_Custom) { @@ -978,7 +979,8 @@ namespace ranges { public: template requires (_Choice<_Ty1, _Ty2>._Strategy != _St::_None) - constexpr void operator()(_Ty1&& _Val1, _Ty2&& _Val2) const noexcept(_Choice<_Ty1, _Ty2>._No_throw) { + _STATIC_CALL_OPERATOR constexpr void operator()(_Ty1&& _Val1, _Ty2&& _Val2) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty1, _Ty2>._No_throw) { constexpr _St _Strat = _Choice<_Ty1, _Ty2>._Strategy; if constexpr (_Strat == _St::_Custom) { @@ -2370,7 +2372,8 @@ namespace ranges { public: template <_Should_range_access _Ty> requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Array) { @@ -2445,7 +2448,8 @@ namespace ranges { public: template <_Should_range_access _Ty> requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Array) { @@ -2583,7 +2587,8 @@ namespace ranges { public: template <_Should_range_access _Ty> requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Member) { @@ -2633,7 +2638,8 @@ namespace ranges { public: template <_Should_range_access _Ty> requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Member) { @@ -2699,13 +2705,13 @@ namespace ranges { 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( + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR 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))}; } #else // ^^^ C++23 / C++20 vvv template > - _NODISCARD constexpr auto operator()(_Ty&& _Val) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR noexcept(noexcept(_RANGES begin(static_cast<_CTy&&>(_Val)))) requires requires { _RANGES begin(static_cast<_CTy&&>(_Val)); } { @@ -2729,13 +2735,13 @@ namespace ranges { 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 + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR 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))}; } #else // ^^^ C++23 / C++20 vvv template > - _NODISCARD constexpr auto operator()(_Ty&& _Val) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR noexcept(noexcept(_RANGES end(static_cast<_CTy&&>(_Val)))) requires requires { _RANGES end(static_cast<_CTy&&>(_Val)); } { @@ -2796,7 +2802,8 @@ namespace ranges { public: template <_Should_range_access _Ty> requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Member) { @@ -2866,7 +2873,8 @@ namespace ranges { public: template <_Should_range_access _Ty> requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Member) { @@ -2897,13 +2905,13 @@ namespace ranges { 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( + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR 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))}; } #else // ^^^ C++23 / C++20 vvv template > - _NODISCARD constexpr auto operator()(_Ty&& _Val) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR noexcept(noexcept(_RANGES rbegin(static_cast<_CTy&&>(_Val)))) requires requires { _RANGES rbegin(static_cast<_CTy&&>(_Val)); } { @@ -2927,13 +2935,13 @@ namespace ranges { 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 + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR 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))}; } #else // ^^^ C++23 / C++20 vvv template > - _NODISCARD constexpr auto operator()(_Ty&& _Val) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR noexcept(noexcept(_RANGES rend(static_cast<_CTy&&>(_Val)))) requires requires { _RANGES rend(static_cast<_CTy&&>(_Val)); } { @@ -3006,7 +3014,8 @@ namespace ranges { public: template requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Array) { @@ -3071,7 +3080,8 @@ namespace ranges { public: template requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr bool operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr bool operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Member) { @@ -3127,7 +3137,8 @@ namespace ranges { public: template <_Should_range_access _Ty> requires (_Choice<_Ty&>._Strategy != _St::_None) - _NODISCARD constexpr auto operator()(_Ty&& _Val) const noexcept(_Choice<_Ty&>._No_throw) { + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR + noexcept(_Choice<_Ty&>._No_throw) { constexpr _St _Strat = _Choice<_Ty&>._Strategy; if constexpr (_Strat == _St::_Member) { @@ -3151,13 +3162,13 @@ namespace ranges { requires requires(_Ty& _Val) { // _RANGES _As_const_pointer(_RANGES data(_RANGES _Possibly_const_range(_Val))); } - _NODISCARD constexpr auto operator()(_Ty&& _Val) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR noexcept(noexcept(_RANGES data(_RANGES _Possibly_const_range(_Val)))) { return _RANGES _As_const_pointer(_RANGES data(_RANGES _Possibly_const_range(_Val))); } #else // ^^^ C++23 / C++20 vvv template > - _NODISCARD constexpr auto operator()(_Ty&& _Val) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Ty&& _Val) _CONST_CALL_OPERATOR noexcept(noexcept(_RANGES data(static_cast<_CTy&&>(_Val)))) requires requires { _RANGES data(static_cast<_CTy&&>(_Val)); } { @@ -3213,7 +3224,7 @@ namespace ranges { class _Advance_fn { public: template - constexpr void operator()(_It& _Where, iter_difference_t<_It> _Off) const { + _STATIC_CALL_OPERATOR constexpr void operator()(_It& _Where, iter_difference_t<_It> _Off) _CONST_CALL_OPERATOR { if constexpr (random_access_iterator<_It>) { _Where += _Off; } else { @@ -3241,11 +3252,11 @@ namespace ranges { } template _Se> - constexpr void operator()(_It& _Where, _Se _Last) const { + _STATIC_CALL_OPERATOR constexpr void operator()(_It& _Where, _Se _Last) _CONST_CALL_OPERATOR { if constexpr (assignable_from<_It&, _Se>) { _Where = static_cast<_Se&&>(_Last); } else if constexpr (sized_sentinel_for<_Se, _It>) { - (*this)(_Where, _Last - _Where); + operator()(_Where, _Last - _Where); } else { _Adl_verify_range(_Where, _Last); @@ -3264,19 +3275,20 @@ namespace ranges { } template _Se> - constexpr iter_difference_t<_It> operator()(_It& _Where, iter_difference_t<_It> _Off, _Se _Last) const { + _STATIC_CALL_OPERATOR constexpr iter_difference_t<_It> operator()( + _It& _Where, iter_difference_t<_It> _Off, _Se _Last) _CONST_CALL_OPERATOR { if constexpr (sized_sentinel_for<_Se, _It>) { const iter_difference_t<_It> _Delta = _Last - _Where; if ((_Off < 0 && _Off <= _Delta) || (_Off > 0 && _Off >= _Delta)) { if constexpr (assignable_from<_It&, _Se>) { _Where = static_cast<_Se&&>(_Last); } else { - (*this)(_Where, _Delta); + operator()(_Where, _Delta); } return _Off - _Delta; } - (*this)(_Where, _Off); + operator()(_Where, _Off); return 0; } else { // performance note: develop unwrapping technology for (i, n, s)? @@ -3303,22 +3315,23 @@ namespace ranges { public: template _Se> requires (!sized_sentinel_for<_Se, _It>) - _NODISCARD constexpr iter_difference_t<_It> operator()(_It _First, _Se _Last) const - noexcept(noexcept(_Distance_unchecked( - _Get_unwrapped(_STD move(_First)), _Get_unwrapped(_STD move(_Last))))) /* strengthened */ { + _NODISCARD _STATIC_CALL_OPERATOR constexpr iter_difference_t<_It> operator()(_It _First, + _Se _Last) _CONST_CALL_OPERATOR noexcept(noexcept(_Distance_unchecked(_Get_unwrapped(_STD move(_First)), + _Get_unwrapped(_STD move(_Last))))) /* strengthened */ { _Adl_verify_range(_First, _Last); return _Distance_unchecked(_Unwrap_iter<_Se>(_STD move(_First)), _Unwrap_sent<_It>(_STD move(_Last))); } template > _Se> - _NODISCARD constexpr iter_difference_t> operator()(_It&& _First, const _Se _Last) const + _NODISCARD _STATIC_CALL_OPERATOR constexpr iter_difference_t> operator()( + _It&& _First, const _Se _Last) _CONST_CALL_OPERATOR noexcept(noexcept(_Last - static_cast&>(_First))) /* strengthened */ { return _Last - static_cast&>(_First); } template - _NODISCARD constexpr range_difference_t<_Rng> operator()(_Rng&& _Range) const - noexcept(_Nothrow_size<_Rng>) /* strengthened */ { + _NODISCARD _STATIC_CALL_OPERATOR constexpr range_difference_t<_Rng> operator()( + _Rng&& _Range) _CONST_CALL_OPERATOR noexcept(_Nothrow_size<_Rng>) /* strengthened */ { if constexpr (sized_range<_Rng>) { return static_cast>(_RANGES size(_Range)); } else { @@ -3353,7 +3366,8 @@ namespace ranges { class _Ssize_fn { public: template - _NODISCARD constexpr auto operator()(_Rng&& _Range) const noexcept(noexcept(_RANGES size(_Range))) + _NODISCARD _STATIC_CALL_OPERATOR constexpr auto operator()(_Rng&& _Range) _CONST_CALL_OPERATOR + noexcept(noexcept(_RANGES size(_Range))) requires requires { _RANGES size(_Range); } { using _Sty = _Make_signed_like_t; @@ -3369,25 +3383,27 @@ namespace ranges { class _Next_fn { public: template - _NODISCARD constexpr _It operator()(_It _Where) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()(_It _Where) _CONST_CALL_OPERATOR { ++_Where; return _Where; } template - _NODISCARD constexpr _It operator()(_It _Where, const iter_difference_t<_It> _Off) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _Where, const iter_difference_t<_It> _Off) _CONST_CALL_OPERATOR { _RANGES advance(_Where, _Off); return _Where; } template _Se> - _NODISCARD constexpr _It operator()(_It _Where, _Se _Last) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()(_It _Where, _Se _Last) _CONST_CALL_OPERATOR { _RANGES advance(_Where, static_cast<_Se&&>(_Last)); return _Where; } template _Se> - _NODISCARD constexpr _It operator()(_It _Where, const iter_difference_t<_It> _Off, _Se _Last) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _Where, const iter_difference_t<_It> _Off, _Se _Last) _CONST_CALL_OPERATOR { _RANGES advance(_Where, _Off, static_cast<_Se&&>(_Last)); return _Where; } @@ -3398,20 +3414,22 @@ namespace ranges { class _Prev_fn { public: template - _NODISCARD constexpr _It operator()(_It _Where) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()(_It _Where) _CONST_CALL_OPERATOR { --_Where; return _Where; } template - _NODISCARD constexpr _It operator()(_It _Where, const iter_difference_t<_It> _Off) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _Where, const iter_difference_t<_It> _Off) _CONST_CALL_OPERATOR { _STL_ASSERT(_Off != _Min_possible_v>, "integer overflow"); _RANGES advance(_Where, -_Off); return _Where; } template - _NODISCARD constexpr _It operator()(_It _Where, const iter_difference_t<_It> _Off, _It _Last) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _Where, const iter_difference_t<_It> _Off, _It _Last) _CONST_CALL_OPERATOR { _STL_ASSERT(_Off != _Min_possible_v>, "integer overflow"); _RANGES advance(_Where, -_Off, static_cast<_It&&>(_Last)); return _Where; @@ -4712,7 +4730,8 @@ namespace ranges { public: template _Se, weakly_incrementable _Out> requires indirectly_copyable<_It, _Out> - constexpr copy_result<_It, _Out> operator()(_It _First, _Se _Last, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr copy_result<_It, _Out> operator()( + _It _First, _Se _Last, _Out _Result) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _RANGES _Copy_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD move(_Result)); @@ -4722,7 +4741,8 @@ namespace ranges { template requires indirectly_copyable, _Out> - constexpr copy_result, _Out> operator()(_Rng&& _Range, _Out _Result) const { + _STATIC_CALL_OPERATOR constexpr copy_result, _Out> operator()( + _Rng&& _Range, _Out _Result) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _RANGES _Copy_unchecked( _RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD move(_Result)); @@ -5082,7 +5102,8 @@ namespace ranges { class _Fill_n_fn { public: template _It> - constexpr _It operator()(_It _First, iter_difference_t<_It> _Count, const _Ty& _Value) const { + _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, iter_difference_t<_It> _Count, const _Ty& _Value) _CONST_CALL_OPERATOR { if (_Count > 0) { auto _UFirst = _STD _Get_unwrapped_n(_STD move(_First), _Count); if (!_STD is_constant_evaluated()) { @@ -5383,8 +5404,8 @@ namespace ranges { template _Se1, input_iterator _It2, sentinel_for<_It2> _Se2, class _Pr = ranges::equal_to, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_comparable<_It1, _It2, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr mismatch_result<_It1, _It2> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, - _Se2 _Last2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr mismatch_result<_It1, _It2> operator()(_It1 _First1, _Se1 _Last1, + _It2 _First2, _Se2 _Last2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); @@ -5415,8 +5436,10 @@ namespace ranges { template requires indirectly_comparable, iterator_t<_Rng2>, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr mismatch_result, borrowed_iterator_t<_Rng2>> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD + _STATIC_CALL_OPERATOR constexpr mismatch_result, borrowed_iterator_t<_Rng2>> + operator()(_Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, + _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { if constexpr (sized_range<_Rng1> && sized_range<_Rng2>) { range_difference_t<_Rng1> _Count1 = _RANGES distance(_Range1); const range_difference_t<_Rng2> _Count2 = _RANGES distance(_Range2); @@ -5897,7 +5920,8 @@ namespace ranges { public: template _Se, class _Ty, class _Pj = identity> requires indirect_binary_predicate, const _Ty*> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _RANGES _Find_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _Val, _STD _Pass_fn(_Proj)); @@ -5908,8 +5932,8 @@ namespace ranges { template requires indirect_binary_predicate, _Pj>, const _Ty*> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()( - _Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, const _Ty& _Val, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _RANGES _Find_unchecked( _RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _Val, _STD _Pass_fn(_Proj)); @@ -6316,7 +6340,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _RANGES _Find_if_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), _RANGES _Unwrap_sent<_It>(_STD move(_Last)), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -6327,7 +6352,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _RANGES _Find_if_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -6343,7 +6369,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_unary_predicate> _Pr> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Find_if_not_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -6355,7 +6382,8 @@ namespace ranges { template , _Pj>> _Pr> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _First = _RANGES begin(_Range); auto _UResult = _Find_if_not_unchecked(_RANGES _Unwrap_range_iter<_Rng>(_STD move(_First)), _Uend(_Range), @@ -6388,7 +6416,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_binary_predicate, projected<_It, _Pj>> _Pr = ranges::equal_to> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); auto _UResult = _Adjacent_find_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -6401,7 +6430,8 @@ namespace ranges { template , _Pj>, projected, _Pj>> _Pr = ranges::equal_to> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _Adjacent_find_unchecked(_Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); @@ -6477,8 +6507,8 @@ namespace ranges { template _Se1, forward_iterator _It2, sentinel_for<_It2> _Se2, class _Pr = ranges::equal_to, class _Pj1 = identity, class _Pj2 = identity> requires indirectly_comparable<_It1, _It2, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr subrange<_It1> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, _Se2 _Last2, - _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr subrange<_It1> operator()(_It1 _First1, _Se1 _Last1, _It2 _First2, + _Se2 _Last2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First1, _Last1); _STD _Adl_verify_range(_First2, _Last2); auto _UFirst1 = _RANGES _Unwrap_iter<_Se1>(_STD move(_First1)); @@ -6502,8 +6532,8 @@ namespace ranges { template requires indirectly_comparable, iterator_t<_Rng2>, _Pr, _Pj1, _Pj2> - _NODISCARD constexpr borrowed_subrange_t<_Rng1> operator()( - _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_subrange_t<_Rng1> operator()( + _Rng1&& _Range1, _Rng2&& _Range2, _Pr _Pred = {}, _Pj1 _Proj1 = {}, _Pj2 _Proj2 = {}) _CONST_CALL_OPERATOR { if constexpr (sized_range<_Rng1> && sized_range<_Rng2>) { const auto _Count1 = _RANGES distance(_Range1); const auto _Count2 = _RANGES distance(_Range2); @@ -6684,7 +6714,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); _STD _Seek_wrapped( _First, _RANGES _Max_element_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -6694,7 +6725,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _RANGES _Max_element_unchecked( _Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); return _RANGES _Rewrap_iterator(_Range, _STD move(_UResult)); @@ -6731,8 +6763,8 @@ namespace ranges { public: template > _Pr = ranges::less> - _NODISCARD constexpr const _Ty& operator()( - const _Ty& _Left, const _Ty& _Right, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr const _Ty& operator()( + const _Ty& _Left, const _Ty& _Right, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if (_STD invoke(_Pred, _STD invoke(_Proj, _Left), _STD invoke(_Proj, _Right))) { return _Right; } else { @@ -6742,7 +6774,8 @@ namespace ranges { template > _Pr = ranges::less> - _NODISCARD constexpr _Ty operator()(initializer_list<_Ty> _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _Ty operator()( + initializer_list<_Ty> _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _First = _Range.begin(); const auto _Last = _Range.end(); _STL_ASSERT(_First != _Last, @@ -6753,7 +6786,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> requires indirectly_copyable_storable, range_value_t<_Rng>*> - _NODISCARD constexpr range_value_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr range_value_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UFirst = _Ubegin(_Range); auto _ULast = _Uend(_Range); _STL_ASSERT( @@ -6878,7 +6912,8 @@ namespace ranges { public: template _Se, class _Pj = identity, indirect_strict_weak_order> _Pr = ranges::less> - _NODISCARD constexpr _It operator()(_It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _It operator()( + _It _First, _Se _Last, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { _STD _Adl_verify_range(_First, _Last); _STD _Seek_wrapped( _First, _RANGES _Min_element_unchecked(_RANGES _Unwrap_iter<_Se>(_STD move(_First)), @@ -6888,7 +6923,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> - _NODISCARD constexpr borrowed_iterator_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr borrowed_iterator_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UResult = _RANGES _Min_element_unchecked( _Ubegin(_Range), _Uend(_Range), _STD _Pass_fn(_Pred), _STD _Pass_fn(_Proj)); return _RANGES _Rewrap_iterator(_Range, _STD move(_UResult)); @@ -6919,8 +6955,8 @@ namespace ranges { public: template > _Pr = ranges::less> - _NODISCARD constexpr const _Ty& operator()( - const _Ty& _Left, const _Ty& _Right, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr const _Ty& operator()( + const _Ty& _Left, const _Ty& _Right, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { if (_STD invoke(_Pred, _STD invoke(_Proj, _Right), _STD invoke(_Proj, _Left))) { return _Right; } else { @@ -6930,7 +6966,8 @@ namespace ranges { template > _Pr = ranges::less> - _NODISCARD constexpr _Ty operator()(initializer_list<_Ty> _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr _Ty operator()( + initializer_list<_Ty> _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { const auto _First = _Range.begin(); const auto _Last = _Range.end(); _STL_ASSERT(_First != _Last, @@ -6941,7 +6978,8 @@ namespace ranges { template , _Pj>> _Pr = ranges::less> requires indirectly_copyable_storable, range_value_t<_Rng>*> - _NODISCARD constexpr range_value_t<_Rng> operator()(_Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) const { + _NODISCARD _STATIC_CALL_OPERATOR constexpr range_value_t<_Rng> operator()( + _Rng&& _Range, _Pr _Pred = {}, _Pj _Proj = {}) _CONST_CALL_OPERATOR { auto _UFirst = _Ubegin(_Range); auto _ULast = _Uend(_Range); _STL_ASSERT( diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index a5c715fd2..db28a5756 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -823,6 +823,7 @@ // warning: constexpr if is a C++17 extension [-Wc++17-extensions] // warning: explicit(bool) is a C++20 extension [-Wc++20-extensions] +// warning: declaring overloaded 'operator()' as 'static' is a C++23 extension [-Wc++23-extensions] // warning: ignoring __declspec(allocator) because the function return type '%s' is not a pointer or reference type // [-Wignored-attributes] // warning: '#pragma float_control' is not supported on this target - ignored [-Wignored-pragmas] @@ -835,6 +836,7 @@ _Pragma("clang diagnostic push") \ _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ _Pragma("clang diagnostic ignored \"-Wc++20-extensions\"") \ + _Pragma("clang diagnostic ignored \"-Wc++23-extensions\"") \ _Pragma("clang diagnostic ignored \"-Wignored-attributes\"") \ _Pragma("clang diagnostic ignored \"-Wignored-pragmas\"") \ _Pragma("clang diagnostic ignored \"-Wuser-defined-literals\"") \ @@ -2024,5 +2026,13 @@ compiler option, or define _ALLOW_RTCc_IN_STL to suppress this error. #define _STL_INTERNAL_STATIC_ASSERT(...) #endif // ^^^ !defined(_ENABLE_STL_INTERNAL_CHECK) ^^^ +#ifdef __cpp_static_call_operator +#define _STATIC_CALL_OPERATOR static +#define _CONST_CALL_OPERATOR +#else // ^^^ defined(__cpp_static_call_operator) / !defined(__cpp_static_call_operator) vvv +#define _STATIC_CALL_OPERATOR +#define _CONST_CALL_OPERATOR const +#endif // ^^^ !defined(__cpp_static_call_operator) ^^^ + #endif // _STL_COMPILER_PREPROCESSOR #endif // _YVALS_CORE_H_