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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions stl/inc/atomic
Original file line number Diff line number Diff line change
Expand Up @@ -2155,8 +2155,8 @@ using _Choose_atomic_base2_t =

#if _HAS_CXX20
template <class _TVal, class _Ty = _TVal>
using _Choose_atomic_base_t = typename _Select<is_floating_point_v<_TVal>>::template _Apply<_Atomic_floating<_Ty>,
_Choose_atomic_base2_t<_TVal, _Ty>>;
using _Choose_atomic_base_t =
_Select<is_floating_point_v<_TVal>>::template _Apply<_Atomic_floating<_Ty>, _Choose_atomic_base2_t<_TVal, _Ty>>;
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
template <class _TVal, class _Ty = _TVal>
using _Choose_atomic_base_t = _Choose_atomic_base2_t<_TVal, _Ty>;
Expand Down Expand Up @@ -2716,23 +2716,27 @@ _Ty atomic_fetch_xor_explicit(

#if _HAS_CXX20
_EXPORT_STD template <class _Ty>
void atomic_wait(const volatile atomic<_Ty>* const _Mem, const typename atomic<_Ty>::value_type _Expected) noexcept {
void atomic_wait(const volatile atomic<_Ty>* const _Mem,
const typename atomic<_Ty>::value_type _Expected) noexcept { // TRANSITION, VSO-1854115, omit typename
_Mem->wait(_Expected);
}

_EXPORT_STD template <class _Ty>
void atomic_wait(const atomic<_Ty>* const _Mem, const typename atomic<_Ty>::value_type _Expected) noexcept {
void atomic_wait(const atomic<_Ty>* const _Mem,
const typename atomic<_Ty>::value_type _Expected) noexcept { // TRANSITION, VSO-1854115, omit typename
_Mem->wait(_Expected);
}

_EXPORT_STD template <class _Ty>
void atomic_wait_explicit(const volatile atomic<_Ty>* const _Mem, const typename atomic<_Ty>::value_type _Expected,
void atomic_wait_explicit(const volatile atomic<_Ty>* const _Mem,
const typename atomic<_Ty>::value_type _Expected, // TRANSITION, VSO-1854115, omit typename
const memory_order _Order) noexcept {
_Mem->wait(_Expected, _Order);
}

_EXPORT_STD template <class _Ty>
void atomic_wait_explicit(const atomic<_Ty>* const _Mem, const typename atomic<_Ty>::value_type _Expected,
void atomic_wait_explicit(const atomic<_Ty>* const _Mem,
const typename atomic<_Ty>::value_type _Expected, // TRANSITION, VSO-1854115, omit typename
const memory_order _Order) noexcept {
_Mem->wait(_Expected, _Order);
}
Expand Down
8 changes: 4 additions & 4 deletions stl/inc/chrono
Original file line number Diff line number Diff line change
Expand Up @@ -3463,9 +3463,9 @@ namespace chrono {

template <class _Duration1, class _Duration2>
_NODISCARD static constexpr bool _Can_represent() {
using _Rep1 = typename _Duration1::rep;
using _Period1 = typename _Duration1::period;
using _Period2 = typename _Duration2::period;
using _Rep1 = _Duration1::rep;
using _Period1 = _Duration1::period;
using _Period2 = _Duration2::period;

// Returns whether _Duration1 can represent _Duration2{1}. Assumes 1 <= _Period2 <=
// 86,400, i.e., we're interested in time periods between seconds and days.
Expand Down Expand Up @@ -3730,7 +3730,7 @@ namespace chrono {
_NODISCARD _InIt _Parse_time_field(_InIt _First, ios_base& _Iosbase, ios_base::iostate& _State,
const char _Flag, const char _Modifier, const unsigned int _Width,
const unsigned int _Subsecond_precision) {
using _CharT = typename _InIt::value_type;
using _CharT = _InIt::value_type;

const auto& _Ctype_fac = _STD use_facet<ctype<_CharT>>(_Iosbase.getloc());
const auto& _Time_fac = _STD use_facet<time_get<_CharT>>(_Iosbase.getloc());
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/deque
Original file line number Diff line number Diff line change
Expand Up @@ -1748,12 +1748,12 @@ _NODISCARD bool operator>=(const deque<_Ty, _Alloc>& _Left, const deque<_Ty, _Al

#if _HAS_CXX20
_EXPORT_STD template <class _Ty, class _Alloc, class _Uty>
typename deque<_Ty, _Alloc>::size_type erase(deque<_Ty, _Alloc>& _Cont, const _Uty& _Val) {
deque<_Ty, _Alloc>::size_type erase(deque<_Ty, _Alloc>& _Cont, const _Uty& _Val) {
return _Erase_remove(_Cont, _Val);
}

_EXPORT_STD template <class _Ty, class _Alloc, class _Pr>
typename deque<_Ty, _Alloc>::size_type erase_if(deque<_Ty, _Alloc>& _Cont, _Pr _Pred) {
deque<_Ty, _Alloc>::size_type erase_if(deque<_Ty, _Alloc>& _Cont, _Pr _Pred) {
return _Erase_remove_if(_Cont, _Pass_fn(_Pred));
}
#endif // _HAS_CXX20
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/forward_list
Original file line number Diff line number Diff line change
Expand Up @@ -1614,12 +1614,12 @@ _NODISCARD bool operator>=(const forward_list<_Ty, _Alloc>& _Left, const forward

#if _HAS_CXX20
_EXPORT_STD template <class _Ty, class _Alloc, class _Uty>
typename forward_list<_Ty, _Alloc>::size_type erase(forward_list<_Ty, _Alloc>& _Cont, const _Uty& _Val) {
forward_list<_Ty, _Alloc>::size_type erase(forward_list<_Ty, _Alloc>& _Cont, const _Uty& _Val) {
return _Cont.remove_if([&](_Ty& _Elem) { return _Elem == _Val; });
}

_EXPORT_STD template <class _Ty, class _Alloc, class _Pr>
typename forward_list<_Ty, _Alloc>::size_type erase_if(forward_list<_Ty, _Alloc>& _Cont, _Pr _Pred) {
forward_list<_Ty, _Alloc>::size_type erase_if(forward_list<_Ty, _Alloc>& _Cont, _Pr _Pred) {
return _Cont.remove_if(_Pass_fn(_Pred));
}
#endif // _HAS_CXX20
Expand Down
8 changes: 4 additions & 4 deletions stl/inc/functional
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ public:
// empty function from a DLL that is unloaded later, and then safely moving/destroying that empty function.

// Calls target
typename _Invoke_t<_Noexcept>::_Call _Invoke;
_Invoke_t<_Noexcept>::_Call _Invoke;
// Moves the data, including pointer to "vtable", AND destroys old data (not resetting its "vtable").
// nullptr if we can trivially move two pointers.
void(__stdcall* _Move)(_Move_only_function_data&, _Move_only_function_data&) _NOEXCEPT_FNPTR;
Expand Down Expand Up @@ -1787,7 +1787,7 @@ public:
}
}

using _VtInvQuals = typename _Call::template _VtInvQuals<_Vt>;
using _VtInvQuals = _Call::template _VtInvQuals<_Vt>;
this->template _Construct_with_fn<_Vt, _VtInvQuals>(_STD forward<_Fn>(_Callable));
}

Expand All @@ -1796,7 +1796,7 @@ public:
using _Vt = decay_t<_Fn>;
static_assert(is_same_v<_Vt, _Fn>, "_Vt should be the same type as _Fn. (N4950 [func.wrap.move.ctor]/12)");

using _VtInvQuals = typename _Call::template _VtInvQuals<_Vt>;
using _VtInvQuals = _Call::template _VtInvQuals<_Vt>;
this->template _Construct_with_fn<_Vt, _VtInvQuals>(_STD forward<_CTypes>(_Args)...);
}

Expand All @@ -1806,7 +1806,7 @@ public:
using _Vt = decay_t<_Fn>;
static_assert(is_same_v<_Vt, _Fn>, "_Vt should be the same type as _Fn. (N4950 [func.wrap.move.ctor]/18)");

using _VtInvQuals = typename _Call::template _VtInvQuals<_Vt>;
using _VtInvQuals = _Call::template _VtInvQuals<_Vt>;
this->template _Construct_with_fn<_Vt, _VtInvQuals>(_Li, _STD forward<_CTypes>(_Args)...);
}

Expand Down
4 changes: 2 additions & 2 deletions stl/inc/list
Original file line number Diff line number Diff line change
Expand Up @@ -1916,12 +1916,12 @@ _NODISCARD bool operator>=(const list<_Ty, _Alloc>& _Left, const list<_Ty, _Allo

#if _HAS_CXX20
_EXPORT_STD template <class _Ty, class _Alloc, class _Uty>
typename list<_Ty, _Alloc>::size_type erase(list<_Ty, _Alloc>& _Cont, const _Uty& _Val) {
list<_Ty, _Alloc>::size_type erase(list<_Ty, _Alloc>& _Cont, const _Uty& _Val) {
return _Cont.remove_if([&](_Ty& _Elem) { return _Elem == _Val; });
}

_EXPORT_STD template <class _Ty, class _Alloc, class _Pr>
typename list<_Ty, _Alloc>::size_type erase_if(list<_Ty, _Alloc>& _Cont, _Pr _Pred) {
list<_Ty, _Alloc>::size_type erase_if(list<_Ty, _Alloc>& _Cont, _Pr _Pred) {
return _Cont.remove_if(_Pass_fn(_Pred));
}
#endif // _HAS_CXX20
Expand Down
5 changes: 2 additions & 3 deletions stl/inc/map
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ void swap(map<_Kty, _Ty, _Pr, _Alloc>& _Left, map<_Kty, _Ty, _Pr, _Alloc>& _Righ

#if _HAS_CXX20
_EXPORT_STD template <class _Kty, class _Ty, class _Keylt, class _Alloc, class _Pr>
typename map<_Kty, _Ty, _Keylt, _Alloc>::size_type erase_if(map<_Kty, _Ty, _Keylt, _Alloc>& _Cont, _Pr _Pred) {
map<_Kty, _Ty, _Keylt, _Alloc>::size_type erase_if(map<_Kty, _Ty, _Keylt, _Alloc>& _Cont, _Pr _Pred) {
return _Erase_nodes_if(_Cont, _Pass_fn(_Pred));
}
#endif // _HAS_CXX20
Expand Down Expand Up @@ -687,8 +687,7 @@ void swap(multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, multimap<_Kty, _Ty, _Pr, _All

#if _HAS_CXX20
_EXPORT_STD template <class _Kty, class _Ty, class _Keylt, class _Alloc, class _Pr>
typename multimap<_Kty, _Ty, _Keylt, _Alloc>::size_type erase_if(
multimap<_Kty, _Ty, _Keylt, _Alloc>& _Cont, _Pr _Pred) {
multimap<_Kty, _Ty, _Keylt, _Alloc>::size_type erase_if(multimap<_Kty, _Ty, _Keylt, _Alloc>& _Cont, _Pr _Pred) {
return _Erase_nodes_if(_Cont, _Pass_fn(_Pred));
}
#endif // _HAS_CXX20
Expand Down
12 changes: 6 additions & 6 deletions stl/inc/memory
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ _NODISCARD bool operator==(const shared_ptr<_Ty>& _Left, nullptr_t) noexcept {
#if _HAS_CXX20
_EXPORT_STD template <class _Ty>
_NODISCARD strong_ordering operator<=>(const shared_ptr<_Ty>& _Left, nullptr_t) noexcept {
return _Left.get() <=> static_cast<typename shared_ptr<_Ty>::element_type*>(nullptr);
return _Left.get() <=> static_cast<shared_ptr<_Ty>::element_type*>(nullptr);
}
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
template <class _Ty>
Expand Down Expand Up @@ -4134,26 +4134,26 @@ struct _Pointer_of_helper {};

template <_Has_member_pointer _Ty>
struct _Pointer_of_helper<_Ty> {
using type = typename _Ty::pointer;
using type = _Ty::pointer;
};

template <_Has_member_element_type _Ty>
requires (!_Has_member_pointer<_Ty>)
struct _Pointer_of_helper<_Ty> {
using type = typename _Ty::element_type*;
using type = _Ty::element_type*;
};

// clang-format off
template <class _Ty>
requires (!_Has_member_element_type<_Ty> && !_Has_member_pointer<_Ty>
&& _Has_member_element_type<pointer_traits<_Ty>>)
struct _Pointer_of_helper<_Ty> {
using type = typename pointer_traits<_Ty>::element_type*;
using type = pointer_traits<_Ty>::element_type*;
};
// clang-format on

template <class _Ty>
using _Pointer_of = typename _Pointer_of_helper<_Ty>::type;
using _Pointer_of = _Pointer_of_helper<_Ty>::type;

template <class _Ty, class _Uty>
struct _Pointer_of_or_helper {
Expand All @@ -4167,7 +4167,7 @@ struct _Pointer_of_or_helper<_Ty, _Uty> {
};

template <class _Ty, class _Uty>
using _Pointer_of_or = typename _Pointer_of_or_helper<_Ty, _Uty>::type;
using _Pointer_of_or = _Pointer_of_or_helper<_Ty, _Uty>::type;

// TRANSITION, requires expression support
template <class _SmartPtr, class _Sp, class _Pointer, class... _ArgsT>
Expand Down
13 changes: 6 additions & 7 deletions stl/inc/regex
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ struct _Get_member_comparison_category {

template <class _Ty>
struct _Get_member_comparison_category<_Ty, void_t<typename _Ty::comparison_category>> {
using type = typename _Ty::comparison_category;
using type = _Ty::comparison_category;
};
#endif // _HAS_CXX20

Expand All @@ -624,7 +624,7 @@ public:
using _Size_type = typename string_type::size_type;

#if _HAS_CXX20
using _Comparison_category = typename _Get_member_comparison_category<_Traits>::type;
using _Comparison_category = _Get_member_comparison_category<_Traits>::type;
#endif // _HAS_CXX20

constexpr sub_match() : _Mybase(), matched(false) {}
Expand Down Expand Up @@ -737,7 +737,7 @@ _NODISCARD bool operator==(const sub_match<_BidIt>& _Left, const sub_match<_BidI
#if _HAS_CXX20
_EXPORT_STD template <class _BidIt>
_NODISCARD auto operator<=>(const sub_match<_BidIt>& _Left, const sub_match<_BidIt>& _Right) {
return static_cast<typename sub_match<_BidIt>::_Comparison_category>(_Left.compare(_Right) <=> 0);
return static_cast<sub_match<_BidIt>::_Comparison_category>(_Left.compare(_Right) <=> 0);
}
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
template <class _BidIt>
Expand Down Expand Up @@ -774,7 +774,7 @@ _NODISCARD bool operator==(const sub_match<_BidIt>& _Left, const _Iter_value_t<_
#if _HAS_CXX20
_EXPORT_STD template <class _BidIt>
_NODISCARD auto operator<=>(const sub_match<_BidIt>& _Left, const _Iter_value_t<_BidIt>* _Right) {
return static_cast<typename sub_match<_BidIt>::_Comparison_category>(_Left.compare(_Right) <=> 0);
return static_cast<sub_match<_BidIt>::_Comparison_category>(_Left.compare(_Right) <=> 0);
}
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
template <class _BidIt>
Expand Down Expand Up @@ -841,8 +841,7 @@ _NODISCARD bool operator==(const sub_match<_BidIt>& _Left, const _Iter_value_t<_
#if _HAS_CXX20
_EXPORT_STD template <class _BidIt>
_NODISCARD auto operator<=>(const sub_match<_BidIt>& _Left, const _Iter_value_t<_BidIt>& _Right) {
return static_cast<typename sub_match<_BidIt>::_Comparison_category>(
_Left._Compare(_STD addressof(_Right), 1) <=> 0);
return static_cast<sub_match<_BidIt>::_Comparison_category>(_Left._Compare(_STD addressof(_Right), 1) <=> 0);
}
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
template <class _BidIt>
Expand Down Expand Up @@ -911,7 +910,7 @@ _NODISCARD bool operator==(
_EXPORT_STD template <class _BidIt, class _Traits, class _Alloc>
_NODISCARD auto operator<=>(
const sub_match<_BidIt>& _Left, const basic_string<_Iter_value_t<_BidIt>, _Traits, _Alloc>& _Right) {
return static_cast<typename sub_match<_BidIt>::_Comparison_category>(_Left.compare(_Right) <=> 0);
return static_cast<sub_match<_BidIt>::_Comparison_category>(_Left.compare(_Right) <=> 0);
}
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
template <class _BidIt, class _Traits, class _Alloc>
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/set
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void swap(set<_Kty, _Pr, _Alloc>& _Left, set<_Kty, _Pr, _Alloc>& _Right) noexcep

#if _HAS_CXX20
_EXPORT_STD template <class _Kty, class _Keylt, class _Alloc, class _Pr>
typename set<_Kty, _Keylt, _Alloc>::size_type erase_if(set<_Kty, _Keylt, _Alloc>& _Cont, _Pr _Pred) {
set<_Kty, _Keylt, _Alloc>::size_type erase_if(set<_Kty, _Keylt, _Alloc>& _Cont, _Pr _Pred) {
return _Erase_nodes_if(_Cont, _Pass_fn(_Pred));
}
#endif // _HAS_CXX20
Expand Down Expand Up @@ -474,7 +474,7 @@ void swap(multiset<_Kty, _Pr, _Alloc>& _Left, multiset<_Kty, _Pr, _Alloc>& _Righ

#if _HAS_CXX20
_EXPORT_STD template <class _Kty, class _Keylt, class _Alloc, class _Pr>
typename multiset<_Kty, _Keylt, _Alloc>::size_type erase_if(multiset<_Kty, _Keylt, _Alloc>& _Cont, _Pr _Pred) {
multiset<_Kty, _Keylt, _Alloc>::size_type erase_if(multiset<_Kty, _Keylt, _Alloc>& _Cont, _Pr _Pred) {
return _Erase_nodes_if(_Cont, _Pass_fn(_Pred));
}
#endif // _HAS_CXX20
Expand Down
24 changes: 12 additions & 12 deletions stl/inc/spanstream
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ private:

public:
using char_type = _Elem;
using int_type = typename _Traits::int_type;
using pos_type = typename _Traits::pos_type;
using off_type = typename _Traits::off_type;
using int_type = _Traits::int_type;
using pos_type = _Traits::pos_type;
using off_type = _Traits::off_type;
using traits_type = _Traits;

// N4950 [spanbuf.cons], constructors
Expand Down Expand Up @@ -201,9 +201,9 @@ private:

public:
using char_type = _Elem;
using int_type = typename _Traits::int_type;
using pos_type = typename _Traits::pos_type;
using off_type = typename _Traits::off_type;
using int_type = _Traits::int_type;
using pos_type = _Traits::pos_type;
using off_type = _Traits::off_type;
using traits_type = _Traits;

// N4950 [ispanstream.cons], constructors
Expand Down Expand Up @@ -284,9 +284,9 @@ private:

public:
using char_type = _Elem;
using int_type = typename _Traits::int_type;
using pos_type = typename _Traits::pos_type;
using off_type = typename _Traits::off_type;
using int_type = _Traits::int_type;
using pos_type = _Traits::pos_type;
using off_type = _Traits::off_type;
using traits_type = _Traits;

// N4950 [ospanstream.cons], constructors
Expand Down Expand Up @@ -344,9 +344,9 @@ private:

public:
using char_type = _Elem;
using int_type = typename _Traits::int_type;
using pos_type = typename _Traits::pos_type;
using off_type = typename _Traits::off_type;
using int_type = _Traits::int_type;
using pos_type = _Traits::pos_type;
using off_type = _Traits::off_type;
using traits_type = _Traits;

// N4950 [spanstream.cons], constructors
Expand Down
6 changes: 3 additions & 3 deletions stl/inc/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ struct _Three_way_comparison_result_with_tuple_like<tuple<_TTypes...>, _UTuple,

template <class _TTuple, _Tuple_like _UTuple>
using _Three_way_comparison_result_with_tuple_like_t =
typename _Three_way_comparison_result_with_tuple_like<_TTuple, _UTuple>::type;
_Three_way_comparison_result_with_tuple_like<_TTuple, _UTuple>::type;

template <class _Ty>
concept _Tuple_like_non_tuple = !_Is_specialization_v<_Ty, tuple> && _Tuple_like<_Ty>;
Expand Down Expand Up @@ -1142,7 +1142,7 @@ template <_Tuple_like _TTuple, _Tuple_like _UTuple, template <class> class _TQua
typename _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type;
}
struct basic_common_reference<_TTuple, _UTuple, _TQual, _UQual> {
using type = typename _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type;
using type = _Tuple_like_common_reference<_TTuple, _UTuple, _TQual, _UQual>::type;
};

template <_Tuple_like _TTuple, _Tuple_like _UTuple, class _Indices = make_index_sequence<tuple_size_v<_TTuple>>>
Expand All @@ -1163,7 +1163,7 @@ template <_Tuple_like _TTuple, _Tuple_like _UTuple>
typename _Tuple_like_common_type<_TTuple, _UTuple>::type;
}
struct common_type<_TTuple, _UTuple> {
using type = typename _Tuple_like_common_type<_TTuple, _UTuple>::type;
using type = _Tuple_like_common_type<_TTuple, _UTuple>::type;
};
#endif // _HAS_CXX23 && defined(__cpp_lib_concepts)

Expand Down
Loading