diff --git a/stl/inc/__msvc_chrono.hpp b/stl/inc/__msvc_chrono.hpp index a68c871c7c..4f4e5a1915 100644 --- a/stl/inc/__msvc_chrono.hpp +++ b/stl/inc/__msvc_chrono.hpp @@ -417,7 +417,7 @@ namespace chrono { } #endif // defined(__cpp_lib_concepts) - _EXPORT_STD template , int> _Enabled> + _EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr _To duration_cast(const duration<_Rep, _Period>& _Dur) noexcept( is_arithmetic_v<_Rep>&& is_arithmetic_v) /* strengthened */ { // convert duration to another duration; truncate diff --git a/stl/inc/bit b/stl/inc/bit index b4ecd911d0..cb4252e53e 100644 --- a/stl/inc/bit +++ b/stl/inc/bit @@ -117,7 +117,7 @@ _NODISCARD constexpr _Ty rotl(const _Ty _Val, const int _Rotation) noexcept { } } -_EXPORT_STD template , int> _Enabled> +_EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr _Ty rotr(const _Ty _Val, const int _Rotation) noexcept { constexpr auto _Digits = numeric_limits<_Ty>::digits; @@ -289,7 +289,7 @@ _NODISCARD constexpr unsigned long long _Byteswap_uint64(const unsigned long lon } #endif // _HAS_CXX23 -_EXPORT_STD template , int> _Enabled> +_EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr int countl_zero(const _Ty _Val) noexcept { #if defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) if (!_STD is_constant_evaluated()) { @@ -314,7 +314,7 @@ _NODISCARD constexpr int countr_zero(const _Ty _Val) noexcept { return _Countr_zero(_Val); } -_EXPORT_STD template , int> _Enabled = 0> +_EXPORT_STD template , int> = 0> _NODISCARD constexpr int countr_one(const _Ty _Val) noexcept { return _Countr_zero(static_cast<_Ty>(~_Val)); } diff --git a/stl/inc/limits b/stl/inc/limits index 01e0f119c5..780fed2ae5 100644 --- a/stl/inc/limits +++ b/stl/inc/limits @@ -1231,7 +1231,7 @@ constexpr decltype(auto) _Select_countr_zero_impl(_Fn _Callback) { return _Callback([](_Ty _Val) { return _Countr_zero_fallback(_Val); }); } -template , int> _Enabled = 0> +template , int> = 0> _NODISCARD _CONSTEXPR20 int _Popcount(const _Ty _Val) noexcept { #if _HAS_POPCNT_INTRINSICS || _HAS_NEON_INTRINSICS #if _HAS_CXX20 diff --git a/stl/inc/tuple b/stl/inc/tuple index de4ab09344..12efb5fb71 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -1009,13 +1009,13 @@ _NODISCARD constexpr const _Ty&& get(const tuple<_Types...>&& _Tuple) noexcept { } template -template , int>> +template , int> /* = 0 */> constexpr tuple<_This, _Rest...>::tuple(_Tag, _Tpl&& _Right, index_sequence<_Indices...>) : tuple(_Exact_args_t{}, _STD get<_Indices>(_STD forward<_Tpl>(_Right))...) {} template template , int>> + enable_if_t, int> /* = 0 */> constexpr tuple<_This, _Rest...>::tuple(_Tag, const _Alloc& _Al, _Tpl&& _Right, index_sequence<_Indices...>) : tuple(_Alloc_exact_args_t{}, _Al, _STD get<_Indices>(_STD forward<_Tpl>(_Right))...) {} diff --git a/stl/inc/utility b/stl/inc/utility index f3bfe433fe..b3e4858212 100644 --- a/stl/inc/utility +++ b/stl/inc/utility @@ -78,7 +78,7 @@ _CONSTEXPR20 void iter_swap(_FwdIt1 _Left, _FwdIt2 _Right) { // swap *_Left and swap(*_Left, *_Right); } -_EXPORT_STD template ::value, int> _Enabled> +_EXPORT_STD template ::value, int> /* = 0 */> _CONSTEXPR20 void swap(_Ty (&_Left)[_Size], _Ty (&_Right)[_Size]) noexcept(_Is_nothrow_swappable<_Ty>::value) { if (&_Left != &_Right) { _Ty* _First1 = _Left; @@ -91,9 +91,9 @@ _CONSTEXPR20 void swap(_Ty (&_Left)[_Size], _Ty (&_Right)[_Size]) noexcept(_Is_n } #if _HAS_CXX17 -_EXPORT_STD template && is_move_assignable_v<_Ty>, int> _Enabled> +_EXPORT_STD template && is_move_assignable_v<_Ty>, int> /* = 0 */> #else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv -template +template #endif // _HAS_CXX17 _CONSTEXPR20 void swap(_Ty& _Left, _Ty& _Right) noexcept( is_nothrow_move_constructible_v<_Ty>&& is_nothrow_move_assignable_v<_Ty>) { diff --git a/stl/inc/xmemory b/stl/inc/xmemory index c809f772e9..40aa529c94 100644 --- a/stl/inc/xmemory +++ b/stl/inc/xmemory @@ -2331,7 +2331,7 @@ _NODISCARD constexpr auto uses_allocator_construction_args( _STD forward<_Tuple2>(_Tup2))); } -_EXPORT_STD template , int>> +_EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al) noexcept { // equivalent to // return _STD uses_allocator_construction_args<_Ty>(_Al, piecewise_construct, tuple<>{}, tuple<>{}); @@ -2339,7 +2339,7 @@ _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al) no _STD uses_allocator_construction_args(_Al)); } -_EXPORT_STD template , int>> +_EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al, _Uty1&& _Val1, _Uty2&& _Val2) noexcept { // equivalent to // return _STD uses_allocator_construction_args<_Ty>(_Al, piecewise_construct, @@ -2350,7 +2350,7 @@ _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al, _U } #if _HAS_CXX23 -_EXPORT_STD template , int>> +_EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al, pair<_Uty1, _Uty2>& _Pair) noexcept { // equivalent to // return _STD uses_allocator_construction_args<_Ty>(_Al, piecewise_construct, @@ -2361,7 +2361,7 @@ _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al, pa } #endif // _HAS_CXX23 -_EXPORT_STD template , int>> +_EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr auto uses_allocator_construction_args( const _Alloc& _Al, const pair<_Uty1, _Uty2>& _Pair) noexcept { // equivalent to @@ -2372,7 +2372,7 @@ _NODISCARD constexpr auto uses_allocator_construction_args( _STD uses_allocator_construction_args(_Al, _Pair.second)); } -_EXPORT_STD template , int>> +_EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al, pair<_Uty1, _Uty2>&& _Pair) noexcept { // equivalent to // return _STD uses_allocator_construction_args<_Ty>(_Al, piecewise_construct, @@ -2383,7 +2383,7 @@ _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al, pa } #if _HAS_CXX23 -_EXPORT_STD template , int>> +_EXPORT_STD template , int> /* = 0 */> _NODISCARD constexpr auto uses_allocator_construction_args( const _Alloc& _Al, const pair<_Uty1, _Uty2>&& _Pair) noexcept { // equivalent to @@ -2400,7 +2400,7 @@ _EXPORT_STD template requires _Is_cv_pair<_Ty> && (_Pair_like<_Uty> || !_Is_deducible_as_pair<_Uty&>) #else // ^^^ C++23 with concepts / C++20 or no concepts vvv _EXPORT_STD template && !_Is_deducible_as_pair<_Uty&>, int>> + enable_if_t<_Is_cv_pair<_Ty> && !_Is_deducible_as_pair<_Uty&>, int> /* = 0 */> #endif // ^^^ C++20 or no concepts ^^^ _NODISCARD constexpr auto uses_allocator_construction_args(const _Alloc& _Al, _Uty&& _Ux) noexcept { #if _HAS_CXX23 && defined(__cpp_lib_concepts)