diff --git a/stl/inc/algorithm b/stl/inc/algorithm index a50de6732ca..cf279de648d 100644 --- a/stl/inc/algorithm +++ b/stl/inc/algorithm @@ -44,7 +44,6 @@ _INLINE_VAR constexpr int _ISORT_MAX = 32; // maximum size for insertion sort template _INLINE_VAR constexpr auto _Isort_max = _Iter_diff_t<_It>{_ISORT_MAX}; -// STRUCT TEMPLATE _Optimistic_temporary_buffer template constexpr ptrdiff_t _Temporary_buffer_size(const _Diff _Value) noexcept { // convert an iterator difference_type to a ptrdiff_t for use in temporary buffers @@ -97,7 +96,6 @@ struct _Optimistic_temporary_buffer { // temporary storage with _alloca-like att #ifdef __cpp_lib_concepts namespace ranges { - // STRUCT TEMPLATE in_fun_result template struct in_fun_result { /* [[no_unique_address]] */ _In in; @@ -114,7 +112,6 @@ namespace ranges { } }; - // STRUCT TEMPLATE in_in_out_result template struct in_in_out_result { /* [[no_unique_address]] */ _In1 in1; @@ -133,7 +130,6 @@ namespace ranges { } }; - // STRUCT TEMPLATE in_out_out_result template struct in_out_out_result { /* [[no_unique_address]] */ _In in; @@ -152,7 +148,6 @@ namespace ranges { } }; - // STRUCT TEMPLATE min_max_result template struct min_max_result { /* [[no_unique_address]] */ _Ty min; @@ -169,7 +164,6 @@ namespace ranges { } }; - // STRUCT TEMPLATE in_found_result template struct in_found_result { /* [[no_unique_address]] */ _In in; @@ -186,7 +180,6 @@ namespace ranges { } }; - // FUNCTION TEMPLATE _Rewrap_subrange template _NODISCARD constexpr _Result _Rewrap_subrange(_Wrapped& _Val, subrange<_Unwrapped>&& _UResult) { // conditionally computes a wrapped subrange from a wrapped iterator or range and unwrapped subrange @@ -215,7 +208,6 @@ namespace ranges { } } - // FUNCTION TEMPLATE _Get_final_iterator_unwrapped template _Se> _NODISCARD constexpr auto _Get_final_iterator_unwrapped(const _Unwrapped_t<_Wrapped>& _UFirst, _Se&& _Last) { // find the iterator in [_UFirst, _Get_unwrapped(_Last)) which equals _Get_unwrapped(_Last) [possibly O(N)] @@ -261,7 +253,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE for_each template _CONSTEXPR20 _Fn for_each(_InIt _First, _InIt _Last, _Fn _Func) { // perform function for each element [_First, _Last) _Adl_verify_range(_First, _Last); @@ -278,7 +269,6 @@ _CONSTEXPR20 _Fn for_each(_InIt _First, _InIt _Last, _Fn _Func) { // perform fun template = 0> void for_each(_ExPo&& _Exec, _FwdIt _First, _FwdIt _Last, _Fn _Func) noexcept; // terminates -// FUNCTION TEMPLATE for_each_n template _CONSTEXPR20 _InIt for_each_n(_InIt _First, const _Diff _Count_raw, _Fn _Func) { // perform function for each element [_First, _First + _Count) @@ -307,7 +297,6 @@ namespace ranges { template using for_each_result = in_fun_result<_In, _Fun>; - // VARIABLE ranges::for_each class _For_each_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -359,7 +348,6 @@ namespace ranges { template using for_each_n_result = in_fun_result<_In, _Fun>; - // VARIABLE ranges::for_each_n class _For_each_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -387,12 +375,10 @@ namespace ranges { #endif // __cpp_lib_concepts #if _HAS_CXX17 -// PARALLEL FUNCTION TEMPLATE find_if template = 0> _NODISCARD _FwdIt find_if(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, _Pr _Pred) noexcept; // terminates #endif // _HAS_CXX17 -// FUNCTION TEMPLATE find_if_not template _NODISCARD _CONSTEXPR20 _InIt find_if_not(_InIt _First, const _InIt _Last, _Pr _Pred) { // find first element that satisfies !_Pred @@ -414,7 +400,6 @@ template _NODISCARD _CONSTEXPR20 _FwdIt adjacent_find(const _FwdIt _First, _FwdIt _Last, _Pr _Pred) { // find first satisfying _Pred with successor @@ -452,7 +437,6 @@ _NODISCARD _FwdIt adjacent_find(_ExPo&& _Exec, const _FwdIt _First, const _FwdIt #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::adjacent_find class _Adjacent_find_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -504,7 +488,6 @@ namespace ranges { inline constexpr _Adjacent_find_fn adjacent_find{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::count class _Count_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -548,7 +531,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE count_if template _NODISCARD _CONSTEXPR20 _Iter_diff_t<_InIt> count_if(_InIt _First, _InIt _Last, _Pr _Pred) { // count elements satisfying _Pred @@ -573,7 +555,6 @@ _NODISCARD _Iter_diff_t<_FwdIt> count_if( #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::count_if class _Count_if_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -615,7 +596,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE mismatch template _NODISCARD _CONSTEXPR20 pair<_InIt1, _InIt2> mismatch(_InIt1 _First1, const _InIt1 _Last1, _InIt2 _First2, _Pr _Pred) { // return [_First1, _Last1)/[_First2, ...) mismatch @@ -713,7 +693,6 @@ _NODISCARD pair<_FwdIt1, _FwdIt2> mismatch( #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::equal class _Equal_fn : private _Not_quite_object { private: template @@ -810,7 +789,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE is_permutation template _NODISCARD _CONSTEXPR20 bool is_permutation(_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _Pr _Pred) { // test if [_First1, _Last1) == permuted [_First2, ...) @@ -919,7 +897,6 @@ namespace ranges { concept _Bidi_common_range = common_range<_Rng> && bidirectional_iterator>; // clang-format on - // VARIABLE ranges::is_permutation class _Is_permutation_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1144,7 +1121,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE all_of template _NODISCARD _CONSTEXPR20 bool all_of(_InIt _First, _InIt _Last, _Pr _Pred) { // test if all elements satisfy _Pred _Adl_verify_range(_First, _Last); @@ -1166,7 +1142,6 @@ _NODISCARD bool all_of(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Pr _Pred) noexcept #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::all_of class _All_of_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1207,7 +1182,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE any_of template _NODISCARD _CONSTEXPR20 bool any_of(const _InIt _First, const _InIt _Last, _Pr _Pred) { // test if any element satisfies _Pred @@ -1230,7 +1204,6 @@ _NODISCARD bool any_of(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, _Pr _Pr #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::any_of class _Any_of_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1271,7 +1244,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE none_of template _NODISCARD _CONSTEXPR20 bool none_of(const _InIt _First, const _InIt _Last, _Pr _Pred) { // test if no elements satisfy _Pred @@ -1294,7 +1266,6 @@ _NODISCARD bool none_of(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, _Pr _P #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::none_of class _None_of_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1337,7 +1308,6 @@ namespace ranges { template using copy_n_result = in_out_result<_In, _Out>; - // VARIABLE ranges::copy_n class _Copy_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1372,7 +1342,6 @@ namespace ranges { template using copy_backward_result = in_out_result<_In, _Out>; - // VARIABLE ranges::copy_backward class _Copy_backward_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1403,7 +1372,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE copy_if template _CONSTEXPR20 _OutIt copy_if(_InIt _First, _InIt _Last, _OutIt _Dest, _Pr _Pred) { // copy each satisfying _Pred _Adl_verify_range(_First, _Last); @@ -1438,7 +1406,6 @@ namespace ranges { template using copy_if_result = in_out_result<_In, _Out>; - // VARIABLE ranges::copy_if class _Copy_if_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1495,7 +1462,6 @@ namespace ranges { template using move_result = in_out_result<_In, _Out>; - // VARIABLE ranges::move // clang-format off template _Se, weakly_incrementable _Out> requires indirectly_movable<_It, _Out> @@ -1553,7 +1519,6 @@ namespace ranges { template using move_backward_result = in_out_result<_In, _Out>; - // VARIABLE ranges::move_backward // clang-format off // concept-constrained for strict enforcement as it is used by several algorithms template @@ -1603,7 +1568,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE partition_copy template _CONSTEXPR20 pair<_OutIt1, _OutIt2> partition_copy( _InIt _First, _InIt _Last, _OutIt1 _Dest_true, _OutIt2 _Dest_false, _Pr _Pred) { @@ -1646,7 +1610,6 @@ namespace ranges { template using partition_copy_result = in_out_out_result<_In, _Out1, _Out2>; - // VARIABLE ranges::partition_copy class _Partition_copy_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1712,7 +1675,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE is_partitioned template _NODISCARD _CONSTEXPR20 bool is_partitioned(const _InIt _First, const _InIt _Last, _Pr _Pred) { // test if [_First, _Last) partitioned by _Pred @@ -1746,7 +1708,6 @@ _NODISCARD bool is_partitioned(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::is_partitioned class _Is_partitioned_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1797,7 +1758,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE partition_point template _NODISCARD _CONSTEXPR20 _FwdIt partition_point(_FwdIt _First, _FwdIt _Last, _Pr _Pred) { // find beginning of false partition in [_First, _Last) @@ -1824,7 +1784,6 @@ _NODISCARD _CONSTEXPR20 _FwdIt partition_point(_FwdIt _First, _FwdIt _Last, _Pr #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::partition_point class _Partition_point_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -1921,7 +1880,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE _Equal_rev_pred_unchecked template _NODISCARD _CONSTEXPR20 bool _Equal_rev_pred_unchecked(_InIt1 _First1, _InIt2 _First2, const _InIt2 _Last2, _Pr _Pred) { // compare [_First1, ...) to [_First2, _Last2) @@ -1943,7 +1901,6 @@ _NODISCARD _CONSTEXPR20 bool _Equal_rev_pred_unchecked(_InIt1 _First1, _InIt2 _F return true; } -// FUNCTION TEMPLATE search template _NODISCARD _CONSTEXPR20 _FwdItHaystack search(_FwdItHaystack _First1, _FwdItHaystack _Last1, const _FwdItPat _First2, const _FwdItPat _Last2, _Pr _Pred) { // find first [_First2, _Last2) satisfying _Pred @@ -2018,7 +1975,6 @@ _NODISCARD _CONSTEXPR20 _FwdItHaystack search( #ifdef __cpp_lib_concepts namespace ranges { - // FUNCTION TEMPLATE _Equal_rev_pred // clang-format off template concept _Equal_rev_pred_can_memcmp = is_same_v<_Pj1, identity> && is_same_v<_Pj2, identity> @@ -2059,7 +2015,6 @@ namespace ranges { } // clang-format on - // VARIABLE ranges::search class _Search_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -2168,7 +2123,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE search_n template _NODISCARD _CONSTEXPR20 _FwdIt search_n( const _FwdIt _First, _FwdIt _Last, const _Diff _Count_raw, const _Ty& _Val, _Pr _Pred) { @@ -2263,7 +2217,6 @@ _NODISCARD _FwdIt search_n(_ExPo&& _Exec, const _FwdIt _First, const _FwdIt _Las #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::search_n class _Search_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -2425,7 +2378,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE find_end template _NODISCARD _CONSTEXPR20 _FwdIt1 find_end( _FwdIt1 _First1, const _FwdIt1 _Last1, const _FwdIt2 _First2, const _FwdIt2 _Last2, _Pr _Pred) { @@ -2528,7 +2480,6 @@ _NODISCARD _FwdIt1 find_end(_ExPo&& _Exec, _FwdIt1 _First1, _FwdIt1 _Last1, _Fwd #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::find_end class _Find_end_fn : private _Not_quite_object { private: template @@ -2692,7 +2643,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE find_first_of template _NODISCARD _CONSTEXPR20 _FwdIt1 find_first_of( _FwdIt1 _First1, const _FwdIt1 _Last1, const _FwdIt2 _First2, const _FwdIt2 _Last2, _Pr _Pred) { @@ -2736,7 +2686,6 @@ _NODISCARD _FwdIt1 find_first_of(_ExPo&& _Exec, const _FwdIt1 _First1, const _Fw #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::find_first_of class _Find_first_of_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -2800,7 +2749,6 @@ namespace ranges { template using swap_ranges_result = in_in_result<_In1, _In2>; - // VARIABLE ranges::swap_ranges class _Swap_ranges_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -2859,7 +2807,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE swap_ranges template _CONSTEXPR20 _FwdIt2 swap_ranges(const _FwdIt1 _First1, const _FwdIt1 _Last1, _FwdIt2 _First2) { // swap [_First1, _Last1) with [_First2, ...) @@ -2880,7 +2827,6 @@ _FwdIt2 swap_ranges(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _Dest) noe } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE transform template _CONSTEXPR20 _OutIt transform(const _InIt _First, const _InIt _Last, _OutIt _Dest, _Fn _Func) { // transform [_First, _Last) with _Func @@ -2936,7 +2882,6 @@ namespace ranges { template using binary_transform_result = in_in_out_result<_In1, _In2, _Out>; - // VARIABLE ranges::transform class _Transform_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3040,7 +2985,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE replace template _CONSTEXPR20 void replace(const _FwdIt _First, const _FwdIt _Last, const _Ty& _Oldval, const _Ty& _Newval) { // replace each matching _Oldval with _Newval @@ -3062,7 +3006,6 @@ void replace(_ExPo&& _Exec, const _FwdIt _First, const _FwdIt _Last, const _Ty& #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::replace class _Replace_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3118,7 +3061,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE replace_if template _CONSTEXPR20 void replace_if(const _FwdIt _First, const _FwdIt _Last, _Pr _Pred, const _Ty& _Val) { // replace each satisfying _Pred with _Val @@ -3139,7 +3081,6 @@ void replace_if(_ExPo&& _Exec, _FwdIt _First, _FwdIt _Last, _Pr _Pred, const _Ty #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::replace_if class _Replace_if_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3194,7 +3135,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE replace_copy template _CONSTEXPR20 _OutIt replace_copy(_InIt _First, _InIt _Last, _OutIt _Dest, const _Ty& _Oldval, const _Ty& _Newval) { // copy replacing each matching _Oldval with _Newval @@ -3232,7 +3172,6 @@ namespace ranges { template using replace_copy_result = in_out_result<_In, _Out>; - // VARIABLE ranges::replace_copy class _Replace_copy_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3292,7 +3231,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE replace_copy_if template _CONSTEXPR20 _OutIt replace_copy_if(_InIt _First, _InIt _Last, _OutIt _Dest, _Pr _Pred, const _Ty& _Val) { // copy replacing each satisfying _Pred with _Val @@ -3330,7 +3268,6 @@ namespace ranges { template using replace_copy_if_result = in_out_result<_In, _Out>; - // VARIABLE ranges::replace_copy_if class _Replace_copy_if_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3387,7 +3324,6 @@ namespace ranges { inline constexpr _Replace_copy_if_fn replace_copy_if{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::fill class _Fill_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3433,7 +3369,6 @@ namespace ranges { inline constexpr _Fill_fn fill{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::generate class _Generate_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3476,7 +3411,6 @@ namespace ranges { inline constexpr _Generate_fn generate{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::generate_n class _Generate_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3503,7 +3437,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE generate template _CONSTEXPR20 void generate(_FwdIt _First, _FwdIt _Last, _Fn _Func) { // replace [_First, _Last) with _Func() _Adl_verify_range(_First, _Last); @@ -3523,7 +3456,6 @@ void generate(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Fn _Func) noexcept /* termi } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE generate_n template _CONSTEXPR20 _OutIt generate_n(_OutIt _Dest, const _Diff _Count_raw, _Fn _Func) { // replace [_Dest, _Dest + _Count) with _Func() @@ -3552,7 +3484,6 @@ _FwdIt generate_n(_ExPo&&, const _FwdIt _Dest, const _Diff _Count_raw, _Fn _Func } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE remove_copy template _CONSTEXPR20 _OutIt remove_copy(_InIt _First, _InIt _Last, _OutIt _Dest, const _Ty& _Val) { // copy omitting each matching _Val @@ -3582,7 +3513,6 @@ _FwdIt2 remove_copy(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, const } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE remove_copy_if template _CONSTEXPR20 _OutIt remove_copy_if(_InIt _First, _InIt _Last, _OutIt _Dest, _Pr _Pred) { // copy omitting each element satisfying _Pred @@ -3623,8 +3553,7 @@ _NODISCARD _FwdIt remove_if(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, _P #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::remove - class _Remove_fn : private _Not_quite_object { + class _Remove_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3677,7 +3606,6 @@ namespace ranges { inline constexpr _Remove_fn remove{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::remove_if class _Remove_if_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3734,7 +3662,6 @@ namespace ranges { template using remove_copy_result = in_out_result<_In, _Out>; - // VARIABLE ranges::remove_copy class _Remove_copy_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3796,7 +3723,6 @@ namespace ranges { template using remove_copy_if_result = in_out_result<_In, _Out>; - // VARIABLE ranges::remove_copy_if class _Remove_copy_if_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3857,7 +3783,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE unique template _NODISCARD _CONSTEXPR20 _FwdIt unique(_FwdIt _First, _FwdIt _Last, _Pr _Pred) { // remove each satisfying _Pred with previous @@ -3906,7 +3831,6 @@ _NODISCARD _FwdIt unique(_ExPo&&, _FwdIt _First, _FwdIt _Last) noexcept /* termi #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::unique class _Unique_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -3971,7 +3895,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE unique_copy // clang-format off #ifdef __cpp_lib_concepts template @@ -4070,7 +3993,6 @@ namespace ranges { template using unique_copy_result = in_out_result<_In, _Out>; - // VARIABLE ranges::unique_copy // clang-format off template concept _Is_input_with_value_type = input_iterator<_It> && same_as, _Ty>; @@ -4173,7 +4095,6 @@ namespace ranges { inline constexpr _Unique_copy_fn unique_copy{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::reverse // clang-format off // concept-constrained for strict enforcement as it is used by several algorithms template @@ -4243,7 +4164,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE reverse_copy template _CONSTEXPR20 _OutIt reverse_copy(_BidIt _First, _BidIt _Last, _OutIt _Dest) { // copy reversing elements in [_First, _Last) @@ -4306,7 +4226,6 @@ namespace ranges { template using reverse_copy_result = in_out_result<_In, _Out>; - // VARIABLE ranges::reverse_copy class _Reverse_copy_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -4392,7 +4311,6 @@ namespace ranges { #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::rotate template _NODISCARD constexpr subrange<_It> _Reverse_until_mid_unchecked(_It _First, const _It _Mid, _It _Last) { // reverse until either _First or _Last hits _Mid @@ -4501,7 +4419,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE rotate_copy template _CONSTEXPR20 _OutIt rotate_copy(_FwdIt _First, _FwdIt _Mid, _FwdIt _Last, _OutIt _Dest) { // copy rotating [_First, _Last) @@ -4531,7 +4448,6 @@ namespace ranges { template using rotate_copy_result = in_out_result<_In, _Out>; - // VARIABLE ranges::rotate_copy class _Rotate_copy_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -4584,7 +4500,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE sample template _SampleIt _Sample_reservoir_unchecked( _PopIt _First, const _PopIt _Last, const _SampleIt _Dest, const _Diff _Count, _RngFn& _RngFunc) { @@ -4685,7 +4600,6 @@ concept uniform_random_bit_generator = invocable<_Ty&> // clang-format on namespace ranges { - // VARIABLE ranges::sample class _Sample_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -4790,7 +4704,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE shuffle WITH URNG template void _Random_shuffle1(_RanIt _First, _RanIt _Last, _RngFn& _RngFunc) { // shuffle [_First, _Last) using random function _RngFunc @@ -4822,7 +4735,6 @@ void shuffle(_RanIt _First, _RanIt _Last, _Urng&& _Func) { // shuffle [_First, _ #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::shuffle class _Shuffle_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -4881,14 +4793,12 @@ namespace ranges { #endif // __cpp_lib_concepts #if _HAS_AUTO_PTR_ETC -// FUNCTION TEMPLATE random_shuffle WITH RANDOM FN template void random_shuffle(_RanIt _First, _RanIt _Last, _RngFn&& _RngFunc) { // shuffle [_First, _Last) using random function _RngFunc _Random_shuffle1(_First, _Last, _RngFunc); } -// STRUCT _Rand_urng_from_func struct _Rand_urng_from_func { // wrap rand() as a URNG using result_type = unsigned int; @@ -4905,7 +4815,6 @@ struct _Rand_urng_from_func { // wrap rand() as a URNG } }; -// FUNCTION TEMPLATE random_shuffle template void random_shuffle(_RanIt _First, _RanIt _Last) { // shuffle [_First, _Last) using rand() _Rand_urng_from_func _Func; @@ -4914,7 +4823,6 @@ void random_shuffle(_RanIt _First, _RanIt _Last) { // shuffle [_First, _Last) us #endif // _HAS_AUTO_PTR_ETC #if _HAS_CXX20 -// FUNCTION TEMPLATE shift_left template constexpr _FwdIt shift_left(_FwdIt _First, const _FwdIt _Last, _Iter_diff_t<_FwdIt> _Pos_to_shift) { // shift [_First, _Last) left by _Pos_to_shift @@ -4954,7 +4862,6 @@ _FwdIt shift_left(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Iter_diff_t<_FwdIt> _Po return _STD shift_left(_First, _Last, _Pos_to_shift); } -// FUNCTION TEMPLATE shift_right template constexpr _FwdIt shift_right(_FwdIt _First, const _FwdIt _Last, _Iter_diff_t<_FwdIt> _Pos_to_shift) { // shift [_First, _Last) right by _Pos_to_shift @@ -5035,7 +4942,6 @@ _FwdIt shift_right(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Iter_diff_t<_FwdIt> _P } #endif // _HAS_CXX20 -// FUNCTION TEMPLATE partition template _CONSTEXPR20 _FwdIt partition(_FwdIt _First, const _FwdIt _Last, _Pr _Pred) { // move elements satisfying _Pred to beginning of sequence @@ -5100,7 +5006,6 @@ _FwdIt partition(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, _Pr _Pred) no #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::partition class _Partition_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -5183,7 +5088,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE stable_partition template _BidIt _Buffered_rotate_unchecked(const _BidIt _First, const _BidIt _Mid, const _BidIt _Last, const _Iter_diff_t<_BidIt> _Count1, const _Iter_diff_t<_BidIt> _Count2, _Iter_value_t<_BidIt>* const _Temp_ptr, @@ -5355,7 +5259,6 @@ _BidIt stable_partition(_ExPo&&, _BidIt _First, _BidIt _Last, _Pr _Pred) noexcep #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::stable_partition template _It _Buffered_rotate_common(const _It _First, const _It _Mid, const _It _Last, const iter_difference_t<_It> _Count1, const iter_difference_t<_It> _Count2, iter_value_t<_It>* const _Temp_ptr, const ptrdiff_t _Capacity) { @@ -5556,7 +5459,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE push_heap template _CONSTEXPR20 void _Push_heap_by_index( _RanIt _First, _Iter_diff_t<_RanIt> _Hole, _Iter_diff_t<_RanIt> _Top, _Ty&& _Val, _Pr _Pred) { @@ -5595,7 +5497,6 @@ _CONSTEXPR20 void push_heap(_RanIt _First, _RanIt _Last) { #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::push_heap // clang-format off template requires sortable<_It, _Pr, _Pj1> && indirectly_writable<_It, _Ty> @@ -5669,7 +5570,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE pop_heap template _CONSTEXPR20 void _Pop_heap_hole_by_index( _RanIt _First, _Iter_diff_t<_RanIt> _Hole, _Iter_diff_t<_RanIt> _Bottom, _Ty&& _Val, _Pr _Pred) { @@ -5736,7 +5636,6 @@ _CONSTEXPR20 void pop_heap(_RanIt _First, _RanIt _Last) { #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::pop_heap // clang-format off template requires sortable<_It, _Pr, _Pj1> && indirectly_writable<_It, _Ty> @@ -5841,7 +5740,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE make_heap template _CONSTEXPR20 void _Make_heap_unchecked(_RanIt _First, _RanIt _Last, _Pr _Pred) { // make [_First, _Last) into a heap @@ -5868,7 +5766,6 @@ _CONSTEXPR20 void make_heap(_RanIt _First, _RanIt _Last) { // make [_First, _Las #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::make_heap // clang-format off template requires sortable<_It, _Pr, _Pj> @@ -5923,7 +5820,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATES is_heap AND is_heap_until template _CONSTEXPR20 _RanIt _Is_heap_until_unchecked(_RanIt _First, _RanIt _Last, _Pr _Pred) { // find extent of range that is a heap @@ -5990,7 +5886,6 @@ _NODISCARD bool is_heap(_ExPo&& _Exec, _RanIt _First, _RanIt _Last) noexcept /* #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::is_heap template _NODISCARD constexpr _It _Is_heap_until_unchecked( _It _First, const iter_difference_t<_It> _Size, _Pr _Pred, _Pj _Proj) { @@ -6043,7 +5938,6 @@ namespace ranges { inline constexpr _Is_heap_fn is_heap{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::is_heap_until class _Is_heap_until_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -6074,7 +5968,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE sort_heap template _CONSTEXPR20 void _Sort_heap_unchecked(_RanIt _First, _RanIt _Last, _Pr _Pred) { // order heap by repeatedly popping @@ -6104,7 +5997,6 @@ _CONSTEXPR20 void sort_heap(_RanIt _First, _RanIt _Last) { // order heap by repe #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::sort_heap // clang-format off template requires sortable<_It, _Pr, _Pj> @@ -6151,7 +6043,6 @@ namespace ranges { inline constexpr _Sort_heap_fn sort_heap{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::lower_bound template _NODISCARD constexpr _It _Lower_bound_unchecked( _It _First, iter_difference_t<_It> _Count, const _Ty& _Val, _Pr _Pred, _Pj _Proj) { @@ -6209,7 +6100,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE upper_bound template _NODISCARD _CONSTEXPR20 _FwdIt upper_bound(_FwdIt _First, _FwdIt _Last, const _Ty& _Val, _Pr _Pred) { // find first element that _Val is before @@ -6240,7 +6130,6 @@ _NODISCARD _CONSTEXPR20 _FwdIt upper_bound(_FwdIt _First, _FwdIt _Last, const _T #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::upper_bound template _NODISCARD constexpr _It _Upper_bound_unchecked( _It _First, iter_difference_t<_It> _Count, const _Ty& _Val, _Pr _Pred, _Pj _Proj) { @@ -6296,7 +6185,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE equal_range template _NODISCARD _CONSTEXPR20 pair<_FwdIt, _FwdIt> equal_range(_FwdIt _First, _FwdIt _Last, const _Ty& _Val, _Pr _Pred) { // find range equivalent to _Val @@ -6342,7 +6230,6 @@ _NODISCARD _CONSTEXPR20 pair<_FwdIt, _FwdIt> equal_range(_FwdIt _First, _FwdIt _ #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::equal_range class _Equal_range_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -6404,7 +6291,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE binary_search template _NODISCARD _CONSTEXPR20 bool binary_search(_FwdIt _First, _FwdIt _Last, const _Ty& _Val, _Pr _Pred) { // test if _Val equivalent to some element @@ -6423,7 +6309,6 @@ _NODISCARD _CONSTEXPR20 bool binary_search(_FwdIt _First, _FwdIt _Last, const _T #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::binary_search class _Binary_search_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -6455,7 +6340,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE merge _NODISCARD constexpr _Distance_unknown _Idl_dist_add(_Distance_unknown, _Distance_unknown) { return {}; } @@ -6551,7 +6435,6 @@ namespace ranges { template using merge_result = in_in_out_result<_In1, _In2, _Out>; - // VARIABLE ranges::merge class _Merge_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -6630,7 +6513,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE inplace_merge // The "usual invariants" for the inplace_merge helpers below are: // [_First, _Mid) and [_Mid, _Last) are sorted // _Pred(*_Mid, *_First) note: this means *_Mid is the "lowest" element @@ -6896,7 +6778,6 @@ void inplace_merge(_ExPo&&, _BidIt _First, _BidIt _Mid, _BidIt _Last) noexcept / #ifdef __cpp_lib_concepts namespace ranges { - // FUNCTION TEMPLATE _Is_sorted_until_unchecked // clang-format off template _Se, class _Pr, class _Pj> requires indirect_strict_weak_order<_Pr, projected<_It, _Pj>> @@ -6915,7 +6796,6 @@ namespace ranges { return _First; } - // VARIABLE ranges::inplace_merge template void _Rotate_one_right(_It _First, _It _Mid, _It _Last) { // exchanges the range [_First, _Mid) with [_Mid, _Last) @@ -7236,7 +7116,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE sort template _CONSTEXPR20 _BidIt _Insertion_sort_unchecked(const _BidIt _First, const _BidIt _Last, _Pr _Pred) { // insertion sort [_First, _Last) @@ -7572,7 +7451,6 @@ namespace ranges { } } - // VARIABLE ranges::sort class _Sort_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -7642,7 +7520,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE stable_sort template _Ty* _Uninitialized_merge_move(_FwdIt _First, const _FwdIt _Mid, const _FwdIt _Last, _Ty* const _Dest, _Pr _Pred) { // move merging ranges to uninitialized storage @@ -7839,7 +7716,6 @@ void stable_sort(_ExPo&& _Exec, _BidIt _First, _BidIt _Last) noexcept /* termina #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::stable_sort class _Stable_sort_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -8095,7 +7971,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE partial_sort template _CONSTEXPR20 void partial_sort(_RanIt _First, _RanIt _Mid, _RanIt _Last, _Pr _Pred) { // order [_First, _Last) up to _Mid @@ -8143,7 +8018,6 @@ void partial_sort(_ExPo&&, _RanIt _First, _RanIt _Mid, _RanIt _Last) noexcept /* #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::partial_sort class _Partial_sort_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -8221,7 +8095,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE partial_sort_copy template _CONSTEXPR20 _RanIt partial_sort_copy(_InIt _First1, _InIt _Last1, _RanIt _First2, _RanIt _Last2, _Pr _Pred) { // copy [_First1, _Last1) into [_First2, _Last2) @@ -8285,7 +8158,6 @@ namespace ranges { template using partial_sort_copy_result = in_out_result<_In, _Out>; - // VARIABLE ranges::partial_sort_copy class _Partial_sort_copy_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -8376,7 +8248,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE nth_element template _CONSTEXPR20 void nth_element(_RanIt _First, _RanIt _Nth, _RanIt _Last, _Pr _Pred) { // order Nth element @@ -8426,7 +8297,6 @@ void nth_element(_ExPo&&, _RanIt _First, _RanIt _Nth, _RanIt _Last) noexcept /* #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::nth_element class _Nth_element_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -8501,7 +8371,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE includes template _NODISCARD _CONSTEXPR20 bool includes(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _Pr _Pred) { // test if every element in sorted [_First2, _Last2) is in sorted [_First1, _Last1) @@ -8533,7 +8402,6 @@ _NODISCARD _CONSTEXPR20 bool includes(_InIt1 _First1, _InIt1 _Last1, _InIt2 _Fir } #if _HAS_CXX17 -// FUNCTION TEMPLATE includes template = 0> _NODISCARD bool includes(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred) noexcept /* terminates */ { @@ -8556,7 +8424,6 @@ _NODISCARD bool includes(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _Firs #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::includes class _Includes_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -8628,7 +8495,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE set_union template _CONSTEXPR20 _OutIt set_union(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) { // OR sets [_First1, _Last1) and [_First2, _Last2) @@ -8695,7 +8561,6 @@ namespace ranges { template using set_union_result = in_in_out_result<_In1, _In2, _Out>; - // VARIABLE ranges::set_union class _Set_union_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -8768,7 +8633,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE set_intersection template _CONSTEXPR20 _OutIt set_intersection( _InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) { @@ -8823,7 +8687,6 @@ namespace ranges { template using set_intersection_result = in_in_out_result<_In1, _In2, _Out>; - // VARIABLE ranges::set_intersection class _Set_intersection_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -8903,7 +8766,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE set_difference template _CONSTEXPR20 _OutIt set_difference( _InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) { @@ -8959,7 +8821,6 @@ namespace ranges { template using set_difference_result = in_out_result<_In, _Out>; - // VARIABLE ranges::set_difference class _Set_difference_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -9035,7 +8896,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE set_symmetric_difference template _CONSTEXPR20 _OutIt set_symmetric_difference( _InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) { @@ -9105,7 +8965,6 @@ namespace ranges { template using set_symmetric_difference_result = in_in_out_result<_In1, _In2, _Out>; - // VARIABLE ranges::set_symmetric_difference class _Set_symmetric_difference_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -9189,7 +9048,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE max_element template constexpr _FwdIt _Max_element_unchecked(_FwdIt _First, _FwdIt _Last, _Pr _Pred) { // find largest element _FwdIt _Found = _First; @@ -9233,7 +9091,6 @@ _NODISCARD _FwdIt max_element(_ExPo&&, _FwdIt _First, _FwdIt _Last) noexcept /* #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::max_element template _NODISCARD constexpr _It _Max_element_unchecked(_It _First, const _Se _Last, _Pr _Pred, _Pj _Proj) { _STL_INTERNAL_STATIC_ASSERT(forward_iterator<_It>); @@ -9282,7 +9139,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE min_element template constexpr _FwdIt _Min_element_unchecked(_FwdIt _First, _FwdIt _Last, _Pr _Pred) { // find smallest element _FwdIt _Found = _First; @@ -9326,7 +9182,6 @@ _NODISCARD _FwdIt min_element(_ExPo&&, _FwdIt _First, _FwdIt _Last) noexcept /* #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::min_element template _NODISCARD constexpr _It _Min_element_unchecked(_It _First, const _Se _Last, _Pr _Pred, _Pj _Proj) { _STL_INTERNAL_STATIC_ASSERT(forward_iterator<_It>); @@ -9375,7 +9230,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE minmax_element template constexpr pair<_FwdIt, _FwdIt> _Minmax_element_unchecked(_FwdIt _First, _FwdIt _Last, _Pr _Pred) { // find smallest and largest elements @@ -9452,7 +9306,6 @@ namespace ranges { template using minmax_element_result = min_max_result<_Ty>; - // VARIABLE ranges::minmax_element template constexpr min_max_result<_It> _Minmax_element_unchecked(_It _First, const _Se _Last, _Pr _Pred, _Pj _Proj) { _STL_INTERNAL_STATIC_ASSERT(forward_iterator<_It>); @@ -9537,7 +9390,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 -// FUNCTION TEMPLATE max (for initializer_list) template _NODISCARD constexpr _Ty(max)(initializer_list<_Ty> _Ilist, _Pr _Pred) { // return leftmost/largest @@ -9553,7 +9405,6 @@ _NODISCARD constexpr _Ty(max)(initializer_list<_Ty> _Ilist) { #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::max // clang-format off template concept _Prefer_iterator_copies = // When we have a choice, should we copy iterators or copy elements? @@ -9617,7 +9468,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE min (for initializer_list) template _NODISCARD constexpr _Ty(min)(initializer_list<_Ty> _Ilist, _Pr _Pred) { // return leftmost/smallest @@ -9633,7 +9483,6 @@ _NODISCARD constexpr _Ty(min)(initializer_list<_Ty> _Ilist) { #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::min class _Min_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -9689,7 +9538,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE minmax template _NODISCARD constexpr pair minmax(const _Ty& _Left, const _Ty& _Right, _Pr _Pred) noexcept( noexcept(_DEBUG_LT_PRED(_Pred, _Right, _Left))) /* strengthened */ { @@ -9732,7 +9580,6 @@ namespace ranges { template using minmax_result = min_max_result<_Ty>; - // VARIABLE ranges::minmax class _Minmax_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -9824,7 +9671,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE next_permutation template _CONSTEXPR20 bool next_permutation(_BidIt _First, _BidIt _Last, _Pr _Pred) { // permute and test for pure ascending @@ -9868,7 +9714,6 @@ namespace ranges { template using next_permutation_result = in_found_result<_In>; - // VARIABLE ranges::next_permutation class _Next_permutation_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -9935,7 +9780,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE prev_permutation template _CONSTEXPR20 bool prev_permutation(_BidIt _First, _BidIt _Last, _Pr _Pred) { // reverse permute and test for pure descending @@ -9979,7 +9823,6 @@ namespace ranges { template using prev_permutation_result = in_found_result<_In>; - // VARIABLE ranges::prev_permutation class _Prev_permutation_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -10046,7 +9889,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATES is_sorted AND is_sorted_until template _NODISCARD _CONSTEXPR20 _FwdIt is_sorted_until(const _FwdIt _First, _FwdIt _Last, _Pr _Pred) { // find extent of range that is ordered by predicate @@ -10110,7 +9952,6 @@ _NODISCARD bool is_sorted(_ExPo&& _Exec, _FwdIt _First, _FwdIt _Last) noexcept / #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::is_sorted class _Is_sorted_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -10136,7 +9977,6 @@ namespace ranges { inline constexpr _Is_sorted_fn is_sorted{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::is_sorted_until class _Is_sorted_until_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -10166,7 +10006,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE clamp template _NODISCARD constexpr const _Ty& clamp(const _Ty& _Val, const _Ty& _Min_val, const _Ty& _Max_val, _Pr _Pred) { // returns _Val constrained to [_Min_val, _Max_val] @@ -10196,7 +10035,6 @@ _NODISCARD constexpr const _Ty& clamp(const _Ty& _Val, const _Ty& _Min_val, cons #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::clamp class _Clamp_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -10223,7 +10061,6 @@ namespace ranges { inline constexpr _Clamp_fn clamp{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::lexicographical_compare class _Lexicographical_compare_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; diff --git a/stl/inc/any b/stl/inc/any index 4e62d1b618d..64b0c106e26 100644 --- a/stl/inc/any +++ b/stl/inc/any @@ -31,7 +31,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN -// CLASS bad_any_cast class bad_any_cast : public bad_cast { // thrown by failed any_cast public: _NODISCARD virtual const char* __CLR_OR_THIS_CALL what() const noexcept override { @@ -108,7 +107,6 @@ template inline constexpr _Any_small_RTTI _Any_small_RTTI_obj = { &_Any_small_RTTI::_Destroy_impl<_Ty>, &_Any_small_RTTI::_Copy_impl<_Ty>, &_Any_small_RTTI::_Move_impl<_Ty>}; -// CLASS any class any { // storage for any (CopyConstructible) type public: // Construction and destruction [any.cons] diff --git a/stl/inc/array b/stl/inc/array index ef04a8ba5b9..25d9e6c56b3 100644 --- a/stl/inc/array +++ b/stl/inc/array @@ -18,7 +18,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Array_const_iterator #if _ITERATOR_DEBUG_LEVEL != 0 struct _Iterator_base12_compatible { // TRANSITION, for binary compatibility _Container_proxy* _Myproxy{}; @@ -327,7 +326,6 @@ struct pointer_traits<_Array_const_iterator<_Ty, _Size>> { }; #endif // _HAS_CXX20 -// CLASS TEMPLATE _Array_iterator template class _Array_iterator : public _Array_const_iterator<_Ty, _Size> { public: @@ -433,7 +431,6 @@ struct pointer_traits<_Array_iterator<_Ty, _Size>> { }; #endif // _HAS_CXX20 -// CLASS TEMPLATE array template class array { // fixed size array of values public: @@ -850,7 +847,6 @@ _NODISCARD _CONSTEXPR20 bool operator>=(const array<_Ty, _Size>& _Left, const ar #endif // ^^^ !defined(__cpp_lib_concepts) ^^^ #if _HAS_CXX20 -// FUNCTION TEMPLATE to_array template _NODISCARD constexpr array, _Size> _To_array_lvalue_impl( _Ty (&_Array)[_Size], index_sequence<_Idx...>) { diff --git a/stl/inc/atomic b/stl/inc/atomic index 7442c8fa6c7..f781dd32067 100644 --- a/stl/inc/atomic +++ b/stl/inc/atomic @@ -131,7 +131,6 @@ _END_EXTERN_C #endif _STD_BEGIN -// STRUCT TEMPLATE _Storage_for #if _CMPXCHG_MASK_OUT_PADDING_BITS struct _Form_mask_t {}; _INLINE_VAR constexpr _Form_mask_t _Form_mask{}; @@ -201,13 +200,11 @@ extern "C" inline void atomic_signal_fence(const memory_order _Order) noexcept { } } -// FUNCTION TEMPLATE kill_dependency template _Ty kill_dependency(_Ty _Arg) noexcept { // "magic" template that kills dependency ordering when called return _Arg; } -// FUNCTION _Check_memory_order inline void _Check_memory_order(const memory_order _Order) noexcept { // check that _Order is a valid memory_order if (static_cast(_Order) > static_cast(memory_order_seq_cst)) { @@ -215,7 +212,6 @@ inline void _Check_memory_order(const memory_order _Order) noexcept { } } -// FUNCTION _Check_store_memory_order inline void _Check_store_memory_order(const memory_order _Order) noexcept { switch (_Order) { case memory_order_relaxed: @@ -232,7 +228,6 @@ inline void _Check_store_memory_order(const memory_order _Order) noexcept { } } -// FUNCTION _Check_load_memory_order inline void _Check_load_memory_order(const memory_order _Order) noexcept { switch (_Order) { case memory_order_relaxed: @@ -249,7 +244,6 @@ inline void _Check_load_memory_order(const memory_order _Order) noexcept { } } -// FUNCTION _Combine_cas_memory_orders _NODISCARD inline memory_order _Combine_cas_memory_orders( const memory_order _Success, const memory_order _Failure) noexcept { // Finds upper bound of a compare/exchange memory order @@ -282,7 +276,6 @@ _NODISCARD inline memory_order _Combine_cas_memory_orders( return _Combined_memory_orders[static_cast(_Success)][static_cast(_Failure)]; } -// FUNCTION TEMPLATE _Atomic_reinterpret_as template _NODISCARD _Integral _Atomic_reinterpret_as(const _Ty& _Source) noexcept { // interprets _Source as the supplied integral type @@ -298,7 +291,6 @@ _NODISCARD _Integral _Atomic_reinterpret_as(const _Ty& _Source) noexcept { } } -// FUNCTION _Load_barrier inline void _Load_barrier(const memory_order _Order) noexcept { // implement memory barrier for atomic load functions switch (_Order) { case memory_order_relaxed: @@ -324,7 +316,6 @@ struct _Atomic_padded { }; #else // ^^^ don't break ABI / break ABI vvv -// STRUCT TEMPLATE _Atomic_storage_traits template struct _Atomic_storage_traits { // properties for how _Ty is stored in an atomic static constexpr size_t _Storage_size = sizeof(_Ty) == 1 ? 1 @@ -346,7 +337,6 @@ struct _Atomic_storage_traits<_Ty&> { // properties for how _Ty is stored in an static constexpr bool _Uses_padding = false; }; -// STRUCT TEMPLATE _Atomic_padded template ::_Uses_padding> struct _Atomic_padded { // aggregate to allow explicit constexpr zeroing of padding alignas(_Atomic_storage_traits<_Ty>::_Storage_size) mutable _Ty _Value; @@ -377,7 +367,6 @@ struct _Atomic_storage_types<_Ty&> { using _Spinlock = _Smtx_t*; // POINTER TO mutex }; -// STRUCT TEMPLATE _Atomic_storage #if 1 // TRANSITION, ABI template )> #else // ^^^ don't break ABI / break ABI vvv @@ -1325,7 +1314,6 @@ struct _Atomic_storage<_Ty&, 16> { // lock-free using 16-byte intrinsics }; #endif // _WIN64 -// STRUCT TEMPLATE _Atomic_integral template struct _Atomic_integral; // not defined @@ -1659,7 +1647,6 @@ _INLINE_VAR constexpr bool _Deprecate_non_lock_free_volatile = true; template _CXX20_DEPRECATE_VOLATILE _INLINE_VAR constexpr bool _Deprecate_non_lock_free_volatile<_Ty, false> = true; -// STRUCT TEMPLATE _Atomic_integral_facade template struct _Atomic_integral_facade : _Atomic_integral<_Ty> { // provides operator overloads and other support for atomic integral specializations @@ -1793,7 +1780,6 @@ struct _Atomic_integral_facade : _Atomic_integral<_Ty> { } }; -// STRUCT TEMPLATE _Atomic_integral_facade template struct _Atomic_integral_facade<_Ty&> : _Atomic_integral<_Ty&> { // provides operator overloads and other support for atomic integral specializations @@ -1989,7 +1975,6 @@ struct _Atomic_floating<_Ty&> : _Atomic_storage<_Ty&> { }; #endif // _HAS_CXX20 -// STRUCT TEMPLATE _Atomic_pointer template struct _Atomic_pointer : _Atomic_storage<_Ty> { using _Base = _Atomic_storage<_Ty>; @@ -2092,7 +2077,6 @@ struct _Atomic_pointer : _Atomic_storage<_Ty> { }; -// STRUCT TEMPLATE _Atomic_pointer template struct _Atomic_pointer<_Ty&> : _Atomic_storage<_Ty&> { using _Base = _Atomic_storage<_Ty&>; @@ -2153,7 +2137,6 @@ struct _Atomic_pointer<_Ty&> : _Atomic_storage<_Ty&> { }; -// STRUCT TEMPLATE atomic #define ATOMIC_VAR_INIT(_Value) \ { _Value } @@ -2840,7 +2823,6 @@ using atomic_signed_lock_free = atomic_intptr_t; using atomic_unsigned_lock_free = atomic_uintptr_t; #endif // _HAS_CXX20 -// STRUCT atomic_flag #define ATOMIC_FLAG_INIT \ {} struct atomic_flag { // flag with test-and-set semantics diff --git a/stl/inc/bitset b/stl/inc/bitset index e8e74b7317c..da4601cd4da 100644 --- a/stl/inc/bitset +++ b/stl/inc/bitset @@ -19,7 +19,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE bitset template class bitset { // store fixed-length sequence of Boolean elements public: @@ -28,7 +27,6 @@ public: using _Ty = conditional_t<_Bits <= sizeof(unsigned long) * CHAR_BIT, unsigned long, unsigned long long>; #pragma warning(pop) - // CLASS reference class reference { // proxy for an element friend bitset<_Bits>; @@ -556,7 +554,6 @@ basic_istream<_Elem, _Tr>& operator>>(basic_istream<_Elem, _Tr>& _Istr, bitset<_ return _Istr; } -// STRUCT TEMPLATE SPECIALIZATION hash template struct hash> { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef bitset<_Bits> _ARGUMENT_TYPE_NAME; diff --git a/stl/inc/charconv b/stl/inc/charconv index 4b33f78ff5a..b123b3aae56 100644 --- a/stl/inc/charconv +++ b/stl/inc/charconv @@ -33,7 +33,6 @@ inline constexpr char _Charconv_digits[] = {'0', '1', '2', '3', '4', '5', '6', ' 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; static_assert(_STD size(_Charconv_digits) == 36); -// FUNCTION to_chars (INTEGER TO STRING) template _NODISCARD to_chars_result _Integer_to_chars( char* _First, char* const _Last, const _RawTy _Raw_value, const int _Base) noexcept { @@ -205,7 +204,6 @@ inline to_chars_result to_chars(char* const _First, char* const _Last, const uns to_chars_result to_chars(char* _First, char* _Last, bool _Value, int _Base = 10) = delete; -// STRUCT from_chars_result struct from_chars_result { const char* ptr; errc ec; @@ -214,7 +212,6 @@ struct from_chars_result { #endif // _HAS_CXX20 }; -// FUNCTION from_chars (STRING TO INTEGER) _NODISCARD inline unsigned char _Digit_from_char(const char _Ch) noexcept { // convert ['0', '9'] ['A', 'Z'] ['a', 'z'] to [0, 35], everything else to 255 static constexpr unsigned char _Digit_from_byte[] = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -1643,9 +1640,6 @@ _NODISCARD errc _Convert_hexadecimal_string_to_floating_type( // ^^^^^^^^^^ DERIVED FROM corecrt_internal_strtox.h ^^^^^^^^^^ - -// FUNCTION from_chars (STRING TO FLOATING-POINT) - // C11 6.4.2.1 "General" // digit: one of // 0 1 2 3 4 5 6 7 8 9 @@ -2060,7 +2054,6 @@ inline from_chars_result from_chars(const char* const _First, const char* const return _Result; } -// FUNCTION to_chars (FLOATING-POINT TO STRING) template _NODISCARD to_chars_result _Floating_to_chars_hex_precision( char* _First, char* const _Last, const _Floating _Value, int _Precision) noexcept { diff --git a/stl/inc/chrono b/stl/inc/chrono index 1a01e1b28d7..b25a7ee8056 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -49,14 +49,12 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN namespace chrono { - // STRUCT TEMPLATE treat_as_floating_point template struct treat_as_floating_point : is_floating_point<_Rep> {}; // tests for floating-point type template _INLINE_VAR constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; - // STRUCT TEMPLATE duration_values template struct duration_values { // gets arithmetic properties of a type _NODISCARD static constexpr _Rep zero() noexcept { @@ -91,11 +89,9 @@ namespace chrono { inline constexpr bool is_clock_v = _Is_clock_v<_Clock>; #endif // _HAS_CXX20 - // CLASS TEMPLATE duration template > class duration; - // VARIABLE TEMPLATE _Is_duration_v template _INLINE_VAR constexpr bool _Is_duration_v = _Is_specialization_v<_Ty, duration>; @@ -278,11 +274,9 @@ namespace chrono { }; } // namespace chrono -// STRUCT TEMPLATE _Lcm (LEAST COMMON MULTIPLE) template struct _Lcm : integral_constant::value) * _Bx> {}; // compute LCM of _Ax and _Bx -// STRUCT TEMPLATE common_type SPECIALIZATIONS template struct common_type<_CHRONO duration<_Rep1, _Period1>, _CHRONO duration<_Rep2, _Period2>> { // common type of two durations @@ -442,7 +436,6 @@ namespace chrono { } #endif // defined(__cpp_lib_concepts) - // FUNCTION TEMPLATE duration_cast template , int> _Enabled> _NODISCARD constexpr _To duration_cast(const duration<_Rep, _Period>& _Dur) noexcept( is_arithmetic_v<_Rep>&& is_arithmetic_v) /* strengthened */ { @@ -473,7 +466,6 @@ namespace chrono { } } - // FUNCTION TEMPLATE floor template , int> = 0> _NODISCARD constexpr _To floor(const duration<_Rep, _Period>& _Dur) noexcept( is_arithmetic_v<_Rep>&& is_arithmetic_v) /* strengthened */ { @@ -487,7 +479,6 @@ namespace chrono { return _Casted; } - // FUNCTION TEMPLATE ceil template , int> = 0> _NODISCARD constexpr _To ceil(const duration<_Rep, _Period>& _Dur) noexcept( is_arithmetic_v<_Rep>&& is_arithmetic_v) /* strengthened */ { @@ -501,7 +492,6 @@ namespace chrono { return _Casted; } - // FUNCTION TEMPLATE round template constexpr bool _Is_even(_Rep _Val) noexcept(is_arithmetic_v<_Rep>) /* strengthened */ { // Tests whether _Val is even @@ -525,7 +515,6 @@ namespace chrono { return _Ceiled; } - // FUNCTION TEMPLATE abs template ::is_signed, int> = 0> _NODISCARD constexpr duration<_Rep, _Period> abs(const duration<_Rep, _Period> _Dur) noexcept( is_arithmetic_v<_Rep>) /* strengthened */ { @@ -632,7 +621,6 @@ namespace chrono { } #endif // defined(__cpp_lib_concepts) - // FUNCTION TEMPLATE time_point_cast template , int> = 0> _NODISCARD constexpr time_point<_Clock, _To> time_point_cast(const time_point<_Clock, _Duration>& _Time) noexcept( is_arithmetic_v&& is_arithmetic_v) /* strengthened */ { @@ -640,7 +628,6 @@ namespace chrono { return time_point<_Clock, _To>(_CHRONO duration_cast<_To>(_Time.time_since_epoch())); } - // FUNCTION TEMPLATE floor (for time_point instances) template , int> = 0> _NODISCARD constexpr time_point<_Clock, _To> floor(const time_point<_Clock, _Duration>& _Time) noexcept( is_arithmetic_v&& is_arithmetic_v) /* strengthened */ { @@ -648,7 +635,6 @@ namespace chrono { return time_point<_Clock, _To>(_CHRONO floor<_To>(_Time.time_since_epoch())); } - // FUNCTION TEMPLATE ceil (for time_point instances) template , int> = 0> _NODISCARD constexpr time_point<_Clock, _To> ceil(const time_point<_Clock, _Duration>& _Time) noexcept( is_arithmetic_v&& is_arithmetic_v) /* strengthened */ { @@ -656,7 +642,6 @@ namespace chrono { return time_point<_Clock, _To>(_CHRONO ceil<_To>(_Time.time_since_epoch())); } - // FUNCTION TEMPLATE round (for time_point instances) template && !treat_as_floating_point_v, int> = 0> _NODISCARD constexpr time_point<_Clock, _To> round(const time_point<_Clock, _Duration>& _Time) noexcept( @@ -2249,7 +2234,6 @@ namespace chrono { // [time.zone.info] - // STRUCT sys_info struct sys_info { sys_seconds begin; sys_seconds end; @@ -2258,7 +2242,6 @@ namespace chrono { string abbrev; }; - // STRUCT local_info struct local_info { static constexpr int unique = 0; static constexpr int nonexistent = 1; @@ -2269,7 +2252,6 @@ namespace chrono { sys_info second; }; - // CLASS nonexistent_local_time class nonexistent_local_time : public runtime_error { public: template @@ -2288,7 +2270,6 @@ namespace chrono { #endif // ^^^ workaround ^^^ }; - // CLASS ambiguous_local_time class ambiguous_local_time : public runtime_error { public: template @@ -2309,10 +2290,8 @@ namespace chrono { // [time.zone.timezone] - // ENUM CLASS choose enum class choose { earliest, latest }; - // CLASS time_zone class time_zone { public: explicit time_zone(string_view _Name_) : _Name(_Name_) {} @@ -2476,7 +2455,6 @@ namespace chrono { // [time.zone.leap] - // CLASS leap_second class leap_second { public: leap_second(const leap_second&) = default; @@ -2570,7 +2548,6 @@ namespace chrono { // [time.zone.link] - // CLASS time_zone_link class time_zone_link { public: explicit time_zone_link(string_view _Name_, string_view _Target_) : _Name(_Name_), _Target(_Target_) {} @@ -2623,7 +2600,6 @@ namespace chrono { return _Result == _Vec.end() ? nullptr : &*_Result; } - // STRUCT tzdb struct tzdb { string version; vector zones; @@ -2757,7 +2733,6 @@ namespace chrono { return _STD move(_Icu_version) + "." + _STD to_string(_Num_leap_seconds); } - // CLASS tzdb_list class tzdb_list { private: using _ListType = forward_list>; @@ -2867,7 +2842,6 @@ namespace chrono { inline atomic _Global_tzdb_list; - // FUNCTION get_tzdb_list _NODISCARD inline tzdb_list& get_tzdb_list() { auto* _Tzdb_ptr = _Global_tzdb_list.load(); if (_Tzdb_ptr != nullptr) { @@ -2901,22 +2875,18 @@ namespace chrono { return *_Tzdb_ptr; } - // FUNCTION get_tzdb _NODISCARD inline const tzdb& get_tzdb() { return _CHRONO get_tzdb_list().front(); } - // FUNCTION locate_zone _NODISCARD inline const time_zone* locate_zone(string_view _Tz_name) { return _CHRONO get_tzdb().locate_zone(_Tz_name); } - // FUNCTION current_zone _NODISCARD inline const time_zone* current_zone() { return _CHRONO get_tzdb().current_zone(); } - // FUNCTION reload_tzdb inline const tzdb& reload_tzdb() { _TRY_BEGIN return _CHRONO get_tzdb_list()._Reload(); @@ -2929,7 +2899,6 @@ namespace chrono { _CATCH_END } - // FUNCTION remote_version _NODISCARD inline string remote_version() { const auto& _Tzdb = _CHRONO get_tzdb(); const auto& _Version = _Tzdb.version; @@ -2939,11 +2908,9 @@ namespace chrono { // [time.zone.zonedtraits] - // STRUCT TEMPLATE zoned_traits template struct zoned_traits {}; - // STRUCT zoned_traits template <> struct zoned_traits { _NODISCARD static const time_zone* default_zone() { @@ -2957,7 +2924,6 @@ namespace chrono { // [time.zone.zonedtime] - // CLASS TEMPLATE zoned_time template class zoned_time { private: @@ -3140,13 +3106,11 @@ namespace chrono { using utc_time = time_point; using utc_seconds = utc_time; - // STRUCT leap_second_info struct leap_second_info { bool is_leap_second; seconds elapsed; }; - // FUNCTION TEMPLATE get_leap_second_info template _NODISCARD leap_second_info get_leap_second_info(const utc_time<_Duration>& _Time) { const utc_seconds _Time_floor = _CHRONO floor(_Time); @@ -3220,7 +3184,6 @@ namespace chrono { } } - // CLASS utc_clock class utc_clock { public: using rep = system_clock::rep; @@ -3271,7 +3234,6 @@ namespace chrono { using tai_time = time_point; using tai_seconds = tai_time; - // CLASS tai_clock class tai_clock { public: using rep = system_clock::rep; @@ -3307,7 +3269,6 @@ namespace chrono { using gps_time = time_point; using gps_seconds = gps_time; - // CLASS gps_clock class gps_clock { public: using rep = system_clock::rep; @@ -3414,7 +3375,6 @@ namespace chrono { #if _HAS_CXX20 // [time.clock.conv] - // STRUCT TEMPLATE clock_time_conversion template struct clock_time_conversion {}; @@ -3602,7 +3562,6 @@ namespace chrono { template inline constexpr auto _Clock_cast_choice = _Choose_clock_cast<_DestClock, _SourceClock, _Duration>(); - // FUNCTION TEMPLATE clock_cast template != _Clock_cast_strategy::_None, int> = 0> _NODISCARD auto clock_cast(const time_point<_SourceClock, _Duration>& _Time) { @@ -4997,7 +4956,6 @@ namespace chrono { } }; - // FUNCTION TEMPLATE from_stream template > basic_istream<_CharT, _Traits>& from_stream(basic_istream<_CharT, _Traits>& _Istr, const _CharT* _Fmt, duration<_Rep, _Period>& _Duration, basic_string<_CharT, _Traits, _Alloc>* _Abbrev = nullptr, @@ -5185,7 +5143,6 @@ namespace chrono { minutes* _Offset; }; - // FUNCTION TEMPLATE parse template &>(), _STD declval(), _STD declval<_Parsable&>()))>> diff --git a/stl/inc/cmath b/stl/inc/cmath index afcee6200d4..67232bdbfa4 100644 --- a/stl/inc/cmath +++ b/stl/inc/cmath @@ -561,13 +561,11 @@ using _Common_float_type_t = conditional_t || is_sa double>>; // find type for two-argument math function _STD_END -// FUNCTION TEMPLATE frexp template , int> = 0> double frexp(_Ty _Value, _Out_ int* const _Exp) noexcept /* strengthened */ { return _CSTD frexp(static_cast(_Value), _Exp); } -// FUNCTION TEMPLATE fma template && _STD is_arithmetic_v<_Ty2> && _STD is_arithmetic_v<_Ty3>, int> = 0> _NODISCARD _STD _Common_float_type_t<_Ty1, _STD _Common_float_type_t<_Ty2, _Ty3>> fma( @@ -582,7 +580,6 @@ _NODISCARD _STD _Common_float_type_t<_Ty1, _STD _Common_float_type_t<_Ty2, _Ty3> } } -// FUNCTION TEMPLATE remquo template && _STD is_arithmetic_v<_Ty2>, int> = 0> _STD _Common_float_type_t<_Ty1, _Ty2> remquo(_Ty1 _Left, _Ty2 _Right, int* _Pquo) noexcept /* strengthened */ { using _Common = _STD _Common_float_type_t<_Ty1, _Ty2>; @@ -956,325 +953,261 @@ _NODISCARD _CRT_SATELLITE_2 float __stdcall __std_smf_hypot3f(float, float, floa _END_EXTERN_C _STD_BEGIN -// FUNCTION assoc_laguerre _NODISCARD inline double assoc_laguerre(const unsigned int _Degree, const unsigned int _Order, const double _Value) { return __std_smf_assoc_laguerre(_Degree, _Order, _Value); } -// FUNCTION assoc_laguerref _NODISCARD inline float assoc_laguerref(const unsigned int _Degree, const unsigned int _Order, const float _Value) { return __std_smf_assoc_laguerref(_Degree, _Order, _Value); } -// FUNCTION assoc_laguerrel _NODISCARD inline long double assoc_laguerrel( const unsigned int _Degree, const unsigned int _Order, const long double _Value) { return __std_smf_assoc_laguerre(_Degree, _Order, static_cast(_Value)); } -// FUNCTION assoc_legendre _NODISCARD inline double assoc_legendre(const unsigned int _Degree, const unsigned int _Order, const double _Value) { return __std_smf_assoc_legendre(_Degree, _Order, _Value); } -// FUNCTION assoc_legendref _NODISCARD inline float assoc_legendref(const unsigned int _Degree, const unsigned int _Order, const float _Value) { return __std_smf_assoc_legendref(_Degree, _Order, _Value); } -// FUNCTION assoc_legendrel _NODISCARD inline long double assoc_legendrel( const unsigned int _Degree, const unsigned int _Order, const long double _Value) { return __std_smf_assoc_legendre(_Degree, _Order, static_cast(_Value)); } -// FUNCTION beta _NODISCARD inline double beta(const double _Arg1, const double _Arg2) { return __std_smf_beta(_Arg1, _Arg2); } -// FUNCTION betaf _NODISCARD inline float betaf(const float _Arg1, const float _Arg2) { return __std_smf_betaf(_Arg1, _Arg2); } -// FUNCTION betal _NODISCARD inline long double betal(const long double _Arg1, const long double _Arg2) { return __std_smf_beta(static_cast(_Arg1), static_cast(_Arg2)); } -// FUNCTION comp_ellint_1 _NODISCARD inline double comp_ellint_1(const double _Arg) { return __std_smf_comp_ellint_1(_Arg); } -// FUNCTION comp_ellint_1f _NODISCARD inline float comp_ellint_1f(const float _Arg) { return __std_smf_comp_ellint_1f(_Arg); } -// FUNCTION comp_ellint_1l _NODISCARD inline long double comp_ellint_1l(const long double _Arg) { return __std_smf_comp_ellint_1(static_cast(_Arg)); } -// FUNCTION comp_ellint_2 _NODISCARD inline double comp_ellint_2(const double _Arg) { return __std_smf_comp_ellint_2(_Arg); } -// FUNCTION comp_ellint_2f _NODISCARD inline float comp_ellint_2f(const float _Arg) { return __std_smf_comp_ellint_2f(_Arg); } -// FUNCTION comp_ellint_2l _NODISCARD inline long double comp_ellint_2l(const long double _Arg) { return __std_smf_comp_ellint_2(static_cast(_Arg)); } -// FUNCTION comp_ellint_3 _NODISCARD inline double comp_ellint_3(const double _Arg1, const double _Arg2) { return __std_smf_comp_ellint_3(_Arg1, _Arg2); } -// FUNCTION comp_ellint_3f _NODISCARD inline float comp_ellint_3f(const float _Arg1, const float _Arg2) { return __std_smf_comp_ellint_3f(_Arg1, _Arg2); } -// FUNCTION comp_ellint_3l _NODISCARD inline long double comp_ellint_3l(const long double _Arg1, const long double _Arg2) { return __std_smf_comp_ellint_3(static_cast(_Arg1), static_cast(_Arg2)); } -// FUNCTION cyl_bessel_i _NODISCARD inline double cyl_bessel_i(const double _Arg1, const double _Arg2) { return __std_smf_cyl_bessel_i(_Arg1, _Arg2); } -// FUNCTION cyl_bessel_if _NODISCARD inline float cyl_bessel_if(const float _Arg1, const float _Arg2) { return __std_smf_cyl_bessel_if(_Arg1, _Arg2); } -// FUNCTION cyl_bessel_il _NODISCARD inline long double cyl_bessel_il(const long double _Arg1, const long double _Arg2) { return __std_smf_cyl_bessel_i(static_cast(_Arg1), static_cast(_Arg2)); } -// FUNCTION cyl_bessel_j _NODISCARD inline double cyl_bessel_j(const double _Arg1, const double _Arg2) { return __std_smf_cyl_bessel_j(_Arg1, _Arg2); } -// FUNCTION cyl_bessel_jf _NODISCARD inline float cyl_bessel_jf(const float _Arg1, const float _Arg2) { return __std_smf_cyl_bessel_jf(_Arg1, _Arg2); } -// FUNCTION cyl_bessel_jl _NODISCARD inline long double cyl_bessel_jl(const long double _Arg1, const long double _Arg2) { return __std_smf_cyl_bessel_j(static_cast(_Arg1), static_cast(_Arg2)); } -// FUNCTION cyl_bessel_k _NODISCARD inline double cyl_bessel_k(const double _Arg1, const double _Arg2) { return __std_smf_cyl_bessel_k(_Arg1, _Arg2); } -// FUNCTION cyl_bessel_kf _NODISCARD inline float cyl_bessel_kf(const float _Arg1, const float _Arg2) { return __std_smf_cyl_bessel_kf(_Arg1, _Arg2); } -// FUNCTION cyl_bessel_kl _NODISCARD inline long double cyl_bessel_kl(const long double _Arg1, const long double _Arg2) { return __std_smf_cyl_bessel_k(static_cast(_Arg1), static_cast(_Arg2)); } -// FUNCTION cyl_neumann _NODISCARD inline double cyl_neumann(const double _Arg1, const double _Arg2) { return __std_smf_cyl_neumann(_Arg1, _Arg2); } -// FUNCTION cyl_neumannf _NODISCARD inline float cyl_neumannf(const float _Arg1, const float _Arg2) { return __std_smf_cyl_neumannf(_Arg1, _Arg2); } -// FUNCTION cyl_neumannl _NODISCARD inline long double cyl_neumannl(const long double _Arg1, const long double _Arg2) { return __std_smf_cyl_neumann(static_cast(_Arg1), static_cast(_Arg2)); } -// FUNCTION ellint_1 _NODISCARD inline double ellint_1(const double _Arg1, const double _Arg2) { return __std_smf_ellint_1(_Arg1, _Arg2); } -// FUNCTION ellint_1f _NODISCARD inline float ellint_1f(const float _Arg1, const float _Arg2) { return __std_smf_ellint_1f(_Arg1, _Arg2); } -// FUNCTION ellint_1l _NODISCARD inline long double ellint_1l(const long double _Arg1, const long double _Arg2) { return __std_smf_ellint_1(static_cast(_Arg1), static_cast(_Arg2)); } -// FUNCTION ellint_2 _NODISCARD inline double ellint_2(const double _Arg1, const double _Arg2) { return __std_smf_ellint_2(_Arg1, _Arg2); } -// FUNCTION ellint_2f _NODISCARD inline float ellint_2f(const float _Arg1, const float _Arg2) { return __std_smf_ellint_2f(_Arg1, _Arg2); } -// FUNCTION ellint_2l _NODISCARD inline long double ellint_2l(const long double _Arg1, const long double _Arg2) { return __std_smf_ellint_2(static_cast(_Arg1), static_cast(_Arg2)); } -// FUNCTION ellint_3 _NODISCARD inline double ellint_3(const double _Arg1, const double _Arg2, const double _Arg3) { return __std_smf_ellint_3(_Arg1, _Arg2, _Arg3); } -// FUNCTION ellint_3f _NODISCARD inline float ellint_3f(const float _Arg1, const float _Arg2, const float _Arg3) { return __std_smf_ellint_3f(_Arg1, _Arg2, _Arg3); } -// FUNCTION ellint_3l _NODISCARD inline long double ellint_3l(const long double _Arg1, const long double _Arg2, const long double _Arg3) { return __std_smf_ellint_3(static_cast(_Arg1), static_cast(_Arg2), static_cast(_Arg3)); } -// FUNCTION expint _NODISCARD inline double expint(const double _Arg) { return __std_smf_expint(_Arg); } -// FUNCTION expintf _NODISCARD inline float expintf(const float _Arg) { return __std_smf_expintf(_Arg); } -// FUNCTION expintl _NODISCARD inline long double expintl(const long double _Arg) { return __std_smf_expint(static_cast(_Arg)); } -// FUNCTION hermite _NODISCARD inline double hermite(const unsigned int _Arg1, const double _Arg2) { return __std_smf_hermite(_Arg1, _Arg2); } -// FUNCTION hermitef _NODISCARD inline float hermitef(const unsigned int _Arg1, const float _Arg2) { return __std_smf_hermitef(_Arg1, _Arg2); } -// FUNCTION hermitel _NODISCARD inline long double hermitel(const unsigned int _Arg1, const long double _Arg2) { return __std_smf_hermite(_Arg1, static_cast(_Arg2)); } -// FUNCTION laguerre _NODISCARD inline double laguerre(const unsigned int _Arg1, const double _Arg2) { return __std_smf_laguerre(_Arg1, _Arg2); } -// FUNCTION laguerref _NODISCARD inline float laguerref(const unsigned int _Arg1, const float _Arg2) { return __std_smf_laguerref(_Arg1, _Arg2); } -// FUNCTION laguerrel _NODISCARD inline long double laguerrel(const unsigned int _Arg1, const long double _Arg2) { return __std_smf_laguerre(_Arg1, static_cast(_Arg2)); } -// FUNCTION legendre _NODISCARD inline double legendre(const unsigned int _Degree, const double _Value) { return __std_smf_legendre(_Degree, _Value); } -// FUNCTION legendref _NODISCARD inline float legendref(const unsigned int _Degree, const float _Value) { return __std_smf_legendref(_Degree, _Value); } -// FUNCTION legendrel _NODISCARD inline long double legendrel(const unsigned int _Degree, const long double _Value) { return __std_smf_legendre(_Degree, static_cast(_Value)); } -// FUNCTION riemann_zeta _NODISCARD inline double riemann_zeta(const double _Arg) { return __std_smf_riemann_zeta(_Arg); } -// FUNCTION riemann_zetaf _NODISCARD inline float riemann_zetaf(const float _Arg) { return __std_smf_riemann_zetaf(_Arg); } -// FUNCTION riemann_zetal _NODISCARD inline long double riemann_zetal(const long double _Arg) { return __std_smf_riemann_zeta(static_cast(_Arg)); } -// FUNCTION sph_bessel _NODISCARD inline double sph_bessel(const unsigned int _Arg1, const double _Arg2) { return __std_smf_sph_bessel(_Arg1, _Arg2); } -// FUNCTION sph_besself _NODISCARD inline float sph_besself(const unsigned int _Arg1, const float _Arg2) { return __std_smf_sph_besself(_Arg1, _Arg2); } -// FUNCTION sph_bessell _NODISCARD inline long double sph_bessell(const unsigned int _Arg1, const long double _Arg2) { return __std_smf_sph_bessel(_Arg1, static_cast(_Arg2)); } -// FUNCTION sph_legendre _NODISCARD inline double sph_legendre(const unsigned int _Arg1, const unsigned int _Arg2, const double _Theta) { return __std_smf_sph_legendre(_Arg1, _Arg2, _Theta); } -// FUNCTION sph_legendref _NODISCARD inline float sph_legendref(const unsigned int _Arg1, const unsigned int _Arg2, const float _Theta) { return __std_smf_sph_legendref(_Arg1, _Arg2, _Theta); } -// FUNCTION sph_legendrel _NODISCARD inline long double sph_legendrel( const unsigned int _Arg1, const unsigned int _Arg2, const long double _Theta) { return __std_smf_sph_legendre(_Arg1, _Arg2, static_cast(_Theta)); } -// FUNCTION sph_neumann _NODISCARD inline double sph_neumann(const unsigned int _Arg1, const double _Arg2) { return __std_smf_sph_neumann(_Arg1, _Arg2); } -// FUNCTION sph_neumannf _NODISCARD inline float sph_neumannf(const unsigned int _Arg1, const float _Arg2) { return __std_smf_sph_neumannf(_Arg1, _Arg2); } -// FUNCTION sph_neumannl _NODISCARD inline long double sph_neumannl(const unsigned int _Arg1, const long double _Arg2) { return __std_smf_sph_neumann(_Arg1, static_cast(_Arg2)); } -// FUNCTION hypot (3-argument overloads) _NODISCARD inline double hypot(const double _Dx, const double _Dy, const double _Dz) { return __std_smf_hypot3(_Dx, _Dy, _Dz); } @@ -1299,7 +1232,6 @@ _NODISCARD auto hypot(const _Ty1 _Dx, const _Ty2 _Dy, const _Ty3 _Dz) { } #if _HAS_CXX20 -// FUNCTION lerp template _NODISCARD constexpr _Ty _Common_lerp(const _Ty _ArgA, const _Ty _ArgB, const _Ty _ArgT) noexcept { // on a line intersecting {(0.0, _ArgA), (1.0, _ArgB)}, return the Y value for X == _ArgT diff --git a/stl/inc/codecvt b/stl/inc/codecvt index 0f713872300..aa6459c0569 100644 --- a/stl/inc/codecvt +++ b/stl/inc/codecvt @@ -29,7 +29,6 @@ enum _CXX17_DEPRECATE_CODECVT_HEADER codecvt_mode { consume_header = 4, generate using _Statype = _CSTD mbstate_t; _STL_DISABLE_DEPRECATED_WARNING -// CLASS TEMPLATE codecvt_utf8 template class _CXX17_DEPRECATE_CODECVT_HEADER codecvt_utf8 : public codecvt<_Elem, char, _Statype> { // facet for converting between _Elem and UTF-8 byte sequences @@ -214,7 +213,6 @@ protected: } }; -// CLASS TEMPLATE codecvt_utf16 template class _CXX17_DEPRECATE_CODECVT_HEADER codecvt_utf16 : public codecvt<_Elem, char, _Statype> { // facet for converting between _Elem and UTF-16 multibyte sequences @@ -422,7 +420,6 @@ protected: } }; -// CLASS codecvt_utf8_utf16 template class _CXX17_DEPRECATE_CODECVT_HEADER codecvt_utf8_utf16 : public codecvt<_Elem, char, _Statype> { // facet for converting between UTF-16 _Elem and UTF-8 byte sequences diff --git a/stl/inc/compare b/stl/inc/compare index fda5e24f2d1..8e57b431b37 100644 --- a/stl/inc/compare +++ b/stl/inc/compare @@ -35,7 +35,6 @@ enum class _Compare_eq : _Compare_t { equal = 0, equivalent = equal }; enum class _Compare_ord : _Compare_t { less = -1, greater = 1 }; enum class _Compare_ncmp : _Compare_t { unordered = -128 }; -// CLASS partial_ordering struct partial_ordering { static const partial_ordering less; static const partial_ordering equivalent; @@ -102,7 +101,6 @@ inline constexpr partial_ordering partial_ordering::equivalent{static_cast<_Comp inline constexpr partial_ordering partial_ordering::greater{static_cast<_Compare_t>(_Compare_ord::greater)}; inline constexpr partial_ordering partial_ordering::unordered{static_cast<_Compare_t>(_Compare_ncmp::unordered)}; -// CLASS weak_ordering struct weak_ordering { static const weak_ordering less; static const weak_ordering equivalent; @@ -165,7 +163,6 @@ inline constexpr weak_ordering weak_ordering::less{static_cast<_Compare_t>(_Comp inline constexpr weak_ordering weak_ordering::equivalent{static_cast<_Compare_t>(_Compare_eq::equivalent)}; inline constexpr weak_ordering weak_ordering::greater{static_cast<_Compare_t>(_Compare_ord::greater)}; -// CLASS strong_ordering struct strong_ordering { static const strong_ordering less; static const strong_ordering equal; @@ -234,32 +231,26 @@ inline constexpr strong_ordering strong_ordering::equal{static_cast<_Compare_t>( inline constexpr strong_ordering strong_ordering::equivalent{static_cast<_Compare_t>(_Compare_eq::equivalent)}; inline constexpr strong_ordering strong_ordering::greater{static_cast<_Compare_t>(_Compare_ord::greater)}; -// FUNCTION is_eq _NODISCARD constexpr bool is_eq(const partial_ordering _Comp) noexcept { return _Comp == 0; } -// FUNCTION is_neq _NODISCARD constexpr bool is_neq(const partial_ordering _Comp) noexcept { return _Comp != 0; } -// FUNCTION is_lt _NODISCARD constexpr bool is_lt(const partial_ordering _Comp) noexcept { return _Comp < 0; } -// FUNCTION is_lteq _NODISCARD constexpr bool is_lteq(const partial_ordering _Comp) noexcept { return _Comp <= 0; } -// FUNCTION is_gt _NODISCARD constexpr bool is_gt(const partial_ordering _Comp) noexcept { return _Comp > 0; } -// FUNCTION is_gteq _NODISCARD constexpr bool is_gteq(const partial_ordering _Comp) noexcept { return _Comp >= 0; } @@ -342,7 +333,6 @@ struct compare_three_way { }; // clang-format on -// STRUCT _Synth_three_way struct _Synth_three_way { // clang-format off template diff --git a/stl/inc/complex b/stl/inc/complex index bf222aead8c..4b79f62660d 100644 --- a/stl/inc/complex +++ b/stl/inc/complex @@ -363,7 +363,6 @@ class complex; template <> class complex; -// CLASS TEMPLATE _Ctraits template class _Ctraits { public: @@ -499,7 +498,6 @@ public: } }; -// CLASS _Ctraits template <> class _Ctraits { public: @@ -643,7 +641,6 @@ public: } }; -// CLASS _Ctraits template <> class _Ctraits { public: @@ -782,7 +779,6 @@ public: } }; -// CLASS _Ctraits template <> class _Ctraits { public: @@ -918,14 +914,12 @@ public: } }; -// STRUCT TEMPLATE _Complex_value template struct _Complex_value { enum { _Re = 0, _Im = 1 }; _Ty _Val[2]; }; -// CLASS TEMPLATE _Complex_base template class _Complex_base : public _Valbase { public: @@ -1015,7 +1009,6 @@ protected: } }; -// CLASS complex template <> class complex : public _Complex_base { public: @@ -1107,7 +1100,6 @@ public: } }; -// CLASS complex template <> class complex : public _Complex_base { public: @@ -1199,7 +1191,6 @@ public: } }; -// CLASS complex template <> class complex : public _Complex_base { public: @@ -1291,7 +1282,6 @@ public: } }; -// CONSTRUCTORS FOR complex SPECIALIZATIONS constexpr complex::complex(const complex& _Right) : _Complex_base(static_cast<_Ty>(_Right.real()), static_cast<_Ty>(_Right.imag())) {} @@ -1310,7 +1300,6 @@ constexpr complex::complex(const complex& _Right) constexpr complex::complex(const complex& _Right) : _Complex_base(_Right.real(), _Right.imag()) {} -// CLASS TEMPLATE complex template class complex : public _Complex_base<_Ty, _Complex_value<_Ty>> { public: @@ -1402,7 +1391,6 @@ public: } }; -// FUNCTION TEMPLATE operator+ template _NODISCARD _CONSTEXPR20 complex<_Ty> operator+(const complex<_Ty>& _Left, const complex<_Ty>& _Right) { complex<_Ty> _Tmp(_Left); @@ -1424,7 +1412,6 @@ _NODISCARD _CONSTEXPR20 complex<_Ty> operator+(const _Ty& _Left, const complex<_ return _Tmp; } -// FUNCTION TEMPLATE operator- template _NODISCARD _CONSTEXPR20 complex<_Ty> operator-(const complex<_Ty>& _Left, const complex<_Ty>& _Right) { complex<_Ty> _Tmp(_Left); @@ -1446,7 +1433,6 @@ _NODISCARD _CONSTEXPR20 complex<_Ty> operator-(const _Ty& _Left, const complex<_ return _Tmp; } -// FUNCTION TEMPLATE operator* template _NODISCARD _CONSTEXPR20 complex<_Ty> operator*(const complex<_Ty>& _Left, const complex<_Ty>& _Right) { complex<_Ty> _Tmp(_Left); @@ -1469,7 +1455,6 @@ _NODISCARD _CONSTEXPR20 complex<_Ty> operator*(const _Ty& _Left, const complex<_ return _Tmp; } -// FUNCTION TEMPLATE operator/ template _NODISCARD _CONSTEXPR20 complex<_Ty> operator/(const complex<_Ty>& _Left, const complex<_Ty>& _Right) { complex<_Ty> _Tmp(_Left); @@ -1492,19 +1477,16 @@ _NODISCARD _CONSTEXPR20 complex<_Ty> operator/(const _Ty& _Left, const complex<_ return _Tmp; } -// FUNCTION TEMPLATE UNARY operator+ template _NODISCARD _CONSTEXPR20 complex<_Ty> operator+(const complex<_Ty>& _Left) { return _Left; } -// FUNCTION TEMPLATE UNARY operator- template _NODISCARD _CONSTEXPR20 complex<_Ty> operator-(const complex<_Ty>& _Left) { return complex<_Ty>(-_Left.real(), -_Left.imag()); } -// FUNCTION TEMPLATE operator== template _NODISCARD constexpr bool operator==(const complex<_Ty>& _Left, const complex<_Ty>& _Right) { return _Left.real() == _Right.real() && _Left.imag() == _Right.imag(); @@ -1522,7 +1504,6 @@ _NODISCARD constexpr bool operator==(const _Ty& _Left, const complex<_Ty>& _Righ } #endif // !_HAS_CXX20 -// FUNCTION TEMPLATE operator!= #if !_HAS_CXX20 template _NODISCARD constexpr bool operator!=(const complex<_Ty>& _Left, const complex<_Ty>& _Right) { @@ -1540,13 +1521,11 @@ _NODISCARD constexpr bool operator!=(const _Ty& _Left, const complex<_Ty>& _Righ } #endif // !_HAS_CXX20 -// FUNCTION TEMPLATE imag template _NODISCARD constexpr _Ty imag(const complex<_Ty>& _Left) { return _Left.imag(); } -// FUNCTION TEMPLATE real template _NODISCARD constexpr _Ty real(const complex<_Ty>& _Left) { return _Left.real(); @@ -1555,13 +1534,11 @@ _NODISCARD constexpr _Ty real(const complex<_Ty>& _Left) { template _NODISCARD complex<_Ty> sqrt(const complex<_Ty>& _Left); -// FUNCTION TEMPLATE abs template _NODISCARD _Ty abs(const complex<_Ty>& _Left) { return _Ctraits<_Ty>::hypot(_Left.real(), _Left.imag()); } -// FUNCTION TEMPLATE acos template _NODISCARD complex<_Ty> acos(const complex<_Ty>& _Left) { const _Ty _Arcbig = static_cast<_Ty>(0.25) * _Ctraits<_Ty>::sqrt(_Ctraits<_Ty>::_Flt_max()); @@ -1629,7 +1606,6 @@ _NODISCARD complex<_Ty> acos(const complex<_Ty>& _Left) { return complex<_Ty>(_Ux, _Vx); } -// FUNCTION TEMPLATE acosh template _NODISCARD complex<_Ty> acosh(const complex<_Ty>& _Left) { const _Ty _Arcbig = static_cast<_Ty>(0.25) * _Ctraits<_Ty>::sqrt(_Ctraits<_Ty>::_Flt_max()); @@ -1700,7 +1676,6 @@ _NODISCARD complex<_Ty> acosh(const complex<_Ty>& _Left) { return complex<_Ty>(_Ux, _Vx); } -// FUNCTION TEMPLATE asinh template _NODISCARD complex<_Ty> asinh(const complex<_Ty>& _Left) { const _Ty _Arcbig = static_cast<_Ty>(0.25) * _Ctraits<_Ty>::sqrt(_Ctraits<_Ty>::_Flt_max()); @@ -1766,7 +1741,6 @@ _NODISCARD complex<_Ty> asinh(const complex<_Ty>& _Left) { return complex<_Ty>(_Ux, _Vx); } -// FUNCTION TEMPLATE asin template _NODISCARD complex<_Ty> asin(const complex<_Ty>& _Left) { complex<_Ty> _Asinh = _STD asinh(complex<_Ty>(-imag(_Left), real(_Left))); @@ -1774,7 +1748,6 @@ _NODISCARD complex<_Ty> asin(const complex<_Ty>& _Left) { return complex<_Ty>(imag(_Asinh), -real(_Asinh)); } -// FUNCTION TEMPLATE atanh template _NODISCARD complex<_Ty> atanh(const complex<_Ty>& _Left) { const _Ty _Arcbig = static_cast<_Ty>(0.25) * _Ctraits<_Ty>::sqrt(_Ctraits<_Ty>::_Flt_max()); @@ -1827,7 +1800,6 @@ _NODISCARD complex<_Ty> atanh(const complex<_Ty>& _Left) { return complex<_Ty>(_Ux, _Vx); } -// FUNCTION TEMPLATE atan template _NODISCARD complex<_Ty> atan(const complex<_Ty>& _Left) { complex<_Ty> _Atanh = _STD atanh(complex<_Ty>(-imag(_Left), real(_Left))); @@ -1835,14 +1807,12 @@ _NODISCARD complex<_Ty> atan(const complex<_Ty>& _Left) { return complex<_Ty>(imag(_Atanh), -real(_Atanh)); } -// FUNCTION TEMPLATE cosh template _NODISCARD complex<_Ty> cosh(const complex<_Ty>& _Left) { return complex<_Ty>(_Ctraits<_Ty>::_Cosh(real(_Left), _Ctraits<_Ty>::cos(imag(_Left))), _Ctraits<_Ty>::_Sinh(real(_Left), _Ctraits<_Ty>::sin(imag(_Left)))); } -// FUNCTION TEMPLATE exp template _NODISCARD complex<_Ty> exp(const complex<_Ty>& _Left) { _Ty _Real(real(_Left)), _Imag(real(_Left)); @@ -1851,7 +1821,6 @@ _NODISCARD complex<_Ty> exp(const complex<_Ty>& _Left) { return complex<_Ty>(_Real, _Imag); } -// FUNCTION TEMPLATE _Fabs template _Ty _Fabs(const complex<_Ty>& _Left, int* _Pexp) { // Used by sqrt(), return magnitude and scale factor. // Returns a non-zero even integer in *_Pexp when _Left is finite @@ -1917,7 +1886,6 @@ _Ty _Fabs(const complex<_Ty>& _Left, int* _Pexp) { // Used by sqrt(), return mag } } -// FUNCTION TEMPLATE log template _NODISCARD _Ty _Log_abs(const complex<_Ty>& _Left) noexcept { // for double, long double, and non-floating-point types return static_cast<_Ty>( @@ -1935,7 +1903,6 @@ _NODISCARD complex<_Ty> log(const complex<_Ty>& _Left) { return complex<_Ty>(_Log_abs_v, _Theta); } -// FUNCTION TEMPLATE pow template complex<_Ty> _Pow(const _Ty& _Left, const _Ty& _Right) { if (0 <= _Left) { @@ -1980,14 +1947,12 @@ _NODISCARD complex<_Ty> pow(const complex<_Ty>& _Left, const complex<_Ty>& _Righ } } -// FUNCTION TEMPLATE sinh template _NODISCARD complex<_Ty> sinh(const complex<_Ty>& _Left) { return complex<_Ty>(_Ctraits<_Ty>::_Sinh(real(_Left), _Ctraits<_Ty>::cos(imag(_Left))), _Ctraits<_Ty>::_Cosh(real(_Left), _Ctraits<_Ty>::sin(imag(_Left)))); } -// FUNCTION TEMPLATE sqrt template _NODISCARD complex<_Ty> sqrt(const complex<_Ty>& _Left) { int _Leftexp; @@ -2032,7 +1997,6 @@ _NODISCARD complex<_Ty> sqrt(const complex<_Ty>& _Left) { } } -// FUNCTION TEMPLATE tanh template _NODISCARD complex<_Ty> tanh(const complex<_Ty>& _Left) { _Ty _Tv = _Ctraits<_Ty>::tan(imag(_Left)); @@ -2055,19 +2019,16 @@ _NODISCARD complex<_Ty> tanh(const complex<_Ty>& _Left) { return complex<_Ty>((_Ctraits<_Ty>::sqrt(_Ty{1} + _Sv * _Sv)) * _Bv / _Dv, _Tv / _Dv); } -// FUNCTION TEMPLATE arg template _NODISCARD _Ty arg(const complex<_Ty>& _Left) { // return phase angle of complex as real return _Ctraits<_Ty>::atan2(imag(_Left), real(_Left)); } -// FUNCTION TEMPLATE conj template _NODISCARD _CONSTEXPR20 complex<_Ty> conj(const complex<_Ty>& _Left) { // return complex conjugate return complex<_Ty>(real(_Left), -imag(_Left)); } -// FUNCTION TEMPLATE proj template _NODISCARD complex<_Ty> proj(const complex<_Ty>& _Left) { // return complex projection if (_Ctraits<_Ty>::_Isinf(real(_Left)) || _Ctraits<_Ty>::_Isinf(imag(_Left))) { @@ -2078,26 +2039,22 @@ _NODISCARD complex<_Ty> proj(const complex<_Ty>& _Left) { // return complex proj return _Left; } -// FUNCTION TEMPLATE cos template _NODISCARD complex<_Ty> cos(const complex<_Ty>& _Left) { return complex<_Ty>(_Ctraits<_Ty>::_Cosh(imag(_Left), _Ctraits<_Ty>::cos(real(_Left))), -_Ctraits<_Ty>::_Sinh(imag(_Left), _Ctraits<_Ty>::sin(real(_Left)))); } -// FUNCTION TEMPLATE log10 template _NODISCARD complex<_Ty> log10(const complex<_Ty>& _Left) { return log(_Left) * static_cast<_Ty>(0.43429448190325182765112891891660508L); } -// FUNCTION TEMPLATE norm template _NODISCARD _CONSTEXPR20 _Ty norm(const complex<_Ty>& _Left) { // return squared magnitude return real(_Left) * real(_Left) + imag(_Left) * imag(_Left); } -// FUNCTION TEMPLATE polar template _NODISCARD complex<_Ty> polar(const _Ty& _Rho, const _Ty& _Theta) { // return _Rho * exp(i * _Theta) as complex return complex<_Ty>(_Rho * _Ctraits<_Ty>::cos(_Theta), _Rho * _Ctraits<_Ty>::sin(_Theta)); @@ -2108,14 +2065,12 @@ _NODISCARD complex<_Ty> polar(const _Ty& _Rho) { // return _Rho * exp(i * 0) as return complex<_Ty>(_Rho, _Ty{0}); } -// FUNCTION TEMPLATE sin template _NODISCARD complex<_Ty> sin(const complex<_Ty>& _Left) { return complex<_Ty>(_Ctraits<_Ty>::_Cosh(imag(_Left), _Ctraits<_Ty>::sin(real(_Left))), _Ctraits<_Ty>::_Sinh(imag(_Left), _Ctraits<_Ty>::cos(real(_Left)))); } -// FUNCTION TEMPLATE tan template _NODISCARD complex<_Ty> tan(const complex<_Ty>& _Left) { complex<_Ty> _Zv(tanh(complex<_Ty>(-imag(_Left), real(_Left)))); @@ -2177,7 +2132,6 @@ _NODISCARD complex<_Upgrade_to_double<_Ty>> proj(_Ty _Left) { return complex<_Upgraded>(_Val, 0); } -// FUNCTION TEMPLATE pow template _NODISCARD complex<_Common_float_type_t<_Ty1, _Ty2>> pow(const complex<_Ty1>& _Left, const complex<_Ty2>& _Right) { using _Type = complex<_Common_float_type_t<_Ty1, _Ty2>>; @@ -2198,7 +2152,6 @@ _NODISCARD complex<_Common_float_type_t<_Ty1, _Ty2>> pow(const _Ty1& _Left, cons return _STD pow(_Type(static_cast<_Promoted>(_Left)), _Type(_Right)); } -// FUNCTION TEMPLATE operator>> template basic_istream<_Elem, _Tr>& operator>>(basic_istream<_Elem, _Tr>& _Istr, complex<_Ty>& _Right) { const ctype<_Elem>& _Ctype_fac = _STD use_facet>(_Istr.getloc()); @@ -2229,7 +2182,6 @@ basic_istream<_Elem, _Tr>& operator>>(basic_istream<_Elem, _Tr>& _Istr, complex< return _Istr; } -// FUNCTION TEMPLATE operator<< template basic_ostream<_Elem, _Tr>& operator<<(basic_ostream<_Elem, _Tr>& _Ostr, const complex<_Ty>& _Right) { const ctype<_Elem>& _Ctype_fac = _STD use_facet>(_Ostr.getloc()); diff --git a/stl/inc/concepts b/stl/inc/concepts index a9e548d2fd4..5af1afb5bfc 100644 --- a/stl/inc/concepts +++ b/stl/inc/concepts @@ -309,7 +309,6 @@ concept strict_weak_order = relation<_FTy, _Ty1, _Ty2>; // clang-format on -// STRUCT TEMPLATE _Choice_t template struct _Choice_t { _Ty _Strategy = _Ty{}; diff --git a/stl/inc/coroutine b/stl/inc/coroutine index a9f8f729737..7769db14a3b 100644 --- a/stl/inc/coroutine +++ b/stl/inc/coroutine @@ -35,7 +35,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN -// STRUCT TEMPLATE coroutine_traits template struct _Coroutine_traits {}; @@ -47,7 +46,6 @@ struct _Coroutine_traits<_Ret, void_t> { template struct coroutine_traits : _Coroutine_traits<_Ret> {}; -// STRUCT TEMPLATE coroutine_handle template struct coroutine_handle; @@ -197,10 +195,8 @@ struct hash> { } }; -// STRUCT noop_coroutine_promise struct noop_coroutine_promise {}; -// STRUCT coroutine_handle template <> struct coroutine_handle { friend coroutine_handle noop_coroutine() noexcept; @@ -238,13 +234,11 @@ private: // ALIAS noop_coroutine_handle using noop_coroutine_handle = coroutine_handle; -// FUNCTION noop_coroutine _NODISCARD inline noop_coroutine_handle noop_coroutine() noexcept { // Returns a handle to a coroutine that has no observable effects when resumed or destroyed. return noop_coroutine_handle{}; } -// STRUCT suspend_never struct suspend_never { _NODISCARD constexpr bool await_ready() const noexcept { return true; @@ -254,7 +248,6 @@ struct suspend_never { constexpr void await_resume() const noexcept {} }; -// STRUCT suspend_always struct suspend_always { _NODISCARD constexpr bool await_ready() const noexcept { return false; diff --git a/stl/inc/cstddef b/stl/inc/cstddef index aa370f8ac36..2e346ffc161 100644 --- a/stl/inc/cstddef +++ b/stl/inc/cstddef @@ -25,7 +25,6 @@ using _CSTD size_t; using max_align_t = double; // most aligned type #ifdef __cpp_lib_byte - // ENUM CLASS byte enum class byte : unsigned char {}; template , int> = 0> diff --git a/stl/inc/cvt/ebcdic b/stl/inc/cvt/ebcdic index a2bd7020278..25354bde42f 100644 --- a/stl/inc/cvt/ebcdic +++ b/stl/inc/cvt/ebcdic @@ -22,7 +22,6 @@ namespace stdext { namespace cvt { using _Statype = _CSTD mbstate_t; - // CLASS TEMPLATE codecvt_ebcdic template class codecvt_ebcdic : public _STD diff --git a/stl/inc/cvt/euc_0208 b/stl/inc/cvt/euc_0208 index ecc1e5df927..3d69909aa99 100644 --- a/stl/inc/cvt/euc_0208 +++ b/stl/inc/cvt/euc_0208 @@ -22,7 +22,6 @@ namespace stdext { namespace cvt { using _Statype = _CSTD mbstate_t; - // CLASS TEMPLATE codecvt_euc_0208 template class codecvt_euc_0208 : public _STD codecvt<_Elem, char, _Statype> { // facet for converting between JIS-X0208 _Elem and EUC bytes diff --git a/stl/inc/cvt/jis_0208 b/stl/inc/cvt/jis_0208 index 9f5711fb749..7faae8d8d2c 100644 --- a/stl/inc/cvt/jis_0208 +++ b/stl/inc/cvt/jis_0208 @@ -24,7 +24,6 @@ namespace stdext { #define _ESC_CODE 0x1b - // CLASS TEMPLATE codecvt_jis_0208 template class codecvt_jis_0208 : public _STD codecvt<_Elem, char, _Statype> { // facet for converting between JIS-X0208 _Elem and JIS bytes diff --git a/stl/inc/cvt/one_one b/stl/inc/cvt/one_one index dbcd59e6b32..d19e518c55d 100644 --- a/stl/inc/cvt/one_one +++ b/stl/inc/cvt/one_one @@ -25,7 +25,6 @@ namespace stdext { using _Statype = _CSTD mbstate_t; _STL_DISABLE_DEPRECATED_WARNING - // CLASS TEMPLATE codecvt_one_one template class codecvt_one_one diff --git a/stl/inc/cvt/sjis_0208 b/stl/inc/cvt/sjis_0208 index d2b2d89ac07..b17a2a690cb 100644 --- a/stl/inc/cvt/sjis_0208 +++ b/stl/inc/cvt/sjis_0208 @@ -23,7 +23,6 @@ namespace stdext { using _Statype = _CSTD mbstate_t; - // CLASS TEMPLATE codecvt_sjis_0208 template class codecvt_sjis_0208 : public _STD codecvt<_Elem, char, _Statype> { // facet for converting between JIS-X0208 _Elem and EUC bytes diff --git a/stl/inc/cvt/utf16 b/stl/inc/cvt/utf16 index 7a53127b788..f7e79b4db47 100644 --- a/stl/inc/cvt/utf16 +++ b/stl/inc/cvt/utf16 @@ -24,7 +24,6 @@ namespace stdext { using _Statype = _CSTD mbstate_t; _STL_DISABLE_DEPRECATED_WARNING - // CLASS TEMPLATE codecvt_utf16 template class codecvt_utf16 : public _STD diff --git a/stl/inc/cvt/utf8 b/stl/inc/cvt/utf8 index d5c50aced94..27067c9d928 100644 --- a/stl/inc/cvt/utf8 +++ b/stl/inc/cvt/utf8 @@ -25,7 +25,6 @@ namespace stdext { using _Statype = _CSTD mbstate_t; _STL_DISABLE_DEPRECATED_WARNING - // CLASS TEMPLATE codecvt_utf8 template class codecvt_utf8 : public _STD diff --git a/stl/inc/cvt/utf8_utf16 b/stl/inc/cvt/utf8_utf16 index 7be19d42a8d..ac78d809afe 100644 --- a/stl/inc/cvt/utf8_utf16 +++ b/stl/inc/cvt/utf8_utf16 @@ -25,7 +25,6 @@ namespace stdext { using _Mbstatype = _CSTD mbstate_t; _STL_DISABLE_DEPRECATED_WARNING - // CLASS codecvt_utf8_utf16 template class codecvt_utf8_utf16 diff --git a/stl/inc/cvt/wbuffer b/stl/inc/cvt/wbuffer index 8235088764c..a32614e8f80 100644 --- a/stl/inc/cvt/wbuffer +++ b/stl/inc/cvt/wbuffer @@ -26,7 +26,6 @@ _STL_DISABLE_CLANG_WARNINGS namespace stdext { namespace cvt { - // CLASS TEMPLATE wbuffer_convert template > class wbuffer_convert : public _STD basic_streambuf<_Elem, _Traits> { // stream buffer associated with a codecvt facet diff --git a/stl/inc/cvt/wstring b/stl/inc/cvt/wstring index fbc3cc8dbc2..96b539b4eb1 100644 --- a/stl/inc/cvt/wstring +++ b/stl/inc/cvt/wstring @@ -23,7 +23,6 @@ _STL_DISABLE_CLANG_WARNINGS namespace stdext { namespace cvt { - // CLASS TEMPLATE wstring_convert template class wstring_convert { // converts between _Elem (wide) and char (byte) strings enum { _BUF_INC = 8, _BUF_MAX = 16 }; diff --git a/stl/inc/cvt/xjis b/stl/inc/cvt/xjis index e679097035c..62dcebbf89e 100644 --- a/stl/inc/cvt/xjis +++ b/stl/inc/cvt/xjis @@ -29,7 +29,6 @@ namespace stdext { #define _ESC_CODE 0x1b - // CLASS TEMPLATE codecvt_jis template class codecvt_jis : public _STD diff --git a/stl/inc/cvt/xone_byte b/stl/inc/cvt/xone_byte index 6afc18d39d2..731bbfe7ecc 100644 --- a/stl/inc/cvt/xone_byte +++ b/stl/inc/cvt/xone_byte @@ -23,7 +23,6 @@ namespace stdext { using _Statype = _CSTD mbstate_t; - // CLASS TEMPLATE _Cvt_one_byte template class _Cvt_one_byte : public _STD codecvt<_Elem, char, _Statype> { // facet for converting between _Elem and one-byte sequences diff --git a/stl/inc/cvt/xtwo_byte b/stl/inc/cvt/xtwo_byte index f77fc0dd9fa..af4a6ed7a03 100644 --- a/stl/inc/cvt/xtwo_byte +++ b/stl/inc/cvt/xtwo_byte @@ -23,7 +23,6 @@ namespace stdext { using _Statype = _CSTD mbstate_t; - // CLASS TEMPLATE _Cvt_two_byte template class _Cvt_two_byte : public _STD diff --git a/stl/inc/deque b/stl/inc/deque index 035ca98f837..a20677904bf 100644 --- a/stl/inc/deque +++ b/stl/inc/deque @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Deque_unchecked_const_iterator template class _Deque_unchecked_const_iterator { private: @@ -151,7 +150,6 @@ _NODISCARD _Deque_unchecked_const_iterator<_Mydeque> operator+( return _Next; } -// CLASS TEMPLATE _Deque_unchecked_iterator template class _Deque_unchecked_iterator : public _Deque_unchecked_const_iterator<_Mydeque> { private: @@ -237,7 +235,6 @@ _NODISCARD _Deque_unchecked_iterator<_Mydeque> operator+( return _Next; } -// CLASS TEMPLATE _Deque_const_iterator template class _Deque_const_iterator : public _Iterator_base12 { private: @@ -440,7 +437,6 @@ _NODISCARD _Deque_const_iterator<_Mydeque> operator+( return _Next; } -// CLASS TEMPLATE _Deque_iterator template class _Deque_iterator : public _Deque_const_iterator<_Mydeque> { private: @@ -547,7 +543,6 @@ struct _Deque_simple_types : _Simple_types<_Ty> { using _Mapptr = _Ty**; }; -// CLASS TEMPLATE _Deque_val template class _Deque_val : public _Container_base12 { public: @@ -583,7 +578,6 @@ public: size_type _Mysize; // current length of sequence }; -// CLASS TEMPLATE deque template > class deque { private: diff --git a/stl/inc/exception b/stl/inc/exception index 5c9fdcd8cbf..ec798264966 100644 --- a/stl/inc/exception +++ b/stl/inc/exception @@ -62,7 +62,6 @@ _STD_END #else // _HAS_EXCEPTIONS -// CLASS exception _STDEXT_BEGIN class exception; _STDEXT_END @@ -119,7 +118,6 @@ protected: const char* _Ptr; // the message pointer }; -// CLASS bad_exception class bad_exception : public exception { // base of all bad exceptions public: __CLR_OR_THIS_CALL bad_exception(const char* _Message = "bad exception") noexcept : exception(_Message) {} @@ -132,7 +130,6 @@ protected: } }; -// CLASS bad_alloc class bad_alloc : public exception { // base of all bad allocation exceptions public: __CLR_OR_THIS_CALL bad_alloc() noexcept @@ -316,12 +313,10 @@ _NODISCARD exception_ptr make_exception_ptr(_Ex _Except) noexcept { return exception_ptr::_Copy_exception(_STD addressof(_Except), __GetExceptionInfo(_Except)); } -// FUNCTION _Throw_bad_array_new_length [[noreturn]] inline void _Throw_bad_array_new_length() { _THROW(bad_array_new_length{}); } -// CLASS nested_exception class nested_exception { // wrap an exception_ptr public: nested_exception() noexcept : _Exc(_STD current_exception()) {} @@ -346,7 +341,6 @@ private: exception_ptr _Exc; }; -// FUNCTION TEMPLATE throw_with_nested template struct _With_nested : _Uty, nested_exception { // glue user exception to nested_exception explicit _With_nested(_Ty&& _Arg) @@ -368,7 +362,6 @@ template } #ifdef _CPPRTTI -// FUNCTION TEMPLATE rethrow_if_nested template void _Rethrow_if_nested(const _Ty* _Ptr, true_type) { // use dynamic_cast const auto _Nested = dynamic_cast(_Ptr); diff --git a/stl/inc/execution b/stl/inc/execution index 5ee5c6b987b..873f07cbf4b 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -138,7 +138,6 @@ template <> struct is_execution_policy : true_type {}; #endif // _HAS_CXX20 -// STRUCT _Parallelism_resources_exhausted struct _Parallelism_resources_exhausted : exception { _NODISCARD virtual const char* __CLR_OR_THIS_CALL what() const noexcept override { // return pointer to message string @@ -157,10 +156,8 @@ protected: _THROW(_Parallelism_resources_exhausted{}); } -// ENUM CLASS _Cancellation_status enum class _Cancellation_status : bool { _Running, _Canceled }; -// STRUCT _Cancellation_token struct _Cancellation_token { atomic<_Cancellation_status> _Is_canceled_impl{_Cancellation_status::_Running}; @@ -181,7 +178,6 @@ struct _Cancellation_token { } }; -// CLASS _Work_ptr class _Work_ptr { public: template , _Work_ptr>, int> = 0> @@ -222,14 +218,12 @@ private: __std_PTP_WORK _Ptp_work; }; -// FUNCTION TEMPLATE _Run_available_chunked_work template void _Run_available_chunked_work(_Work& _Operation) { while (_Operation._Process_chunk() == _Cancellation_status::_Running) { // process while there are chunks remaining } } -// FUNCTION TEMPLATE _Run_chunked_parallel_work template void _Run_chunked_parallel_work(const size_t _Hw_threads, _Work& _Operation) { // process chunks of _Operation on the thread pool @@ -249,7 +243,6 @@ void _Run_chunked_parallel_work(const size_t _Hw_threads, _Work& _Operation) { // This assumption should be localized to the chunk calculation functions; the rest of // the library assumes that chunk numbers can be static_cast into the difference_type domain. -// FUNCTION TEMPLATE _Get_chunked_work_chunk_count template constexpr size_t _Get_chunked_work_chunk_count(const size_t _Hw_threads, const _Diff _Count) { // get the number of chunks to break work into to parallelize @@ -258,7 +251,6 @@ constexpr size_t _Get_chunked_work_chunk_count(const size_t _Hw_threads, const _ return (_STD min) (_Hw_threads * _Oversubscription_multiplier, _Size_count); } -// FUNCTION TEMPLATE _Get_least2_chunked_work_chunk_count template constexpr size_t _Get_least2_chunked_work_chunk_count(const size_t _Hw_threads, const _Diff _Count) { // get the number of chunks to break work into to parallelize, assuming chunks must be of size 2 @@ -267,7 +259,6 @@ constexpr size_t _Get_least2_chunked_work_chunk_count(const size_t _Hw_threads, return _Get_chunked_work_chunk_count(_Hw_threads, _Size_count / 2); } -// STRUCT TEMPLATE _Parallelism_allocator struct _Parallelism_allocate_traits { __declspec(allocator) static void* _Allocate(const size_t _Bytes) { void* _Result = ::operator new(_Bytes, nothrow); @@ -358,7 +349,6 @@ struct _Generalized_sum_drop { // drop off point for GENERALIZED_SUM intermediat } }; -// VARIABLE TEMPLATE _Use_atomic_iterator template struct _Atomic_is_usually_lock_free : bool_constant::is_always_lock_free> { // deferred evaluation of atomic::is_always_lock_free @@ -368,7 +358,6 @@ template inline constexpr bool _Use_atomic_iterator = conjunction_v>, is_trivially_copyable<_FwdIt>, _Atomic_is_usually_lock_free<_FwdIt>>; -// STRUCT TEMPLATE _Parallel_choose_min_result template struct _Parallel_choose_min_result { // parallel results collector which uses atomic<_Ty> to choose the minimum value _Ty _Last; @@ -391,7 +380,6 @@ struct _Parallel_choose_min_result { // parallel results collector which uses at } }; -// STRUCT TEMPLATE _Parallel_choose_max_result template struct _Parallel_choose_max_result { // parallel results collector which uses atomic<_Ty> to choose the maximum value _Ty _Last; @@ -418,7 +406,6 @@ struct _Parallel_choose_max_result { // parallel results collector which uses at } }; -// STRUCT TEMPLATE _Parallel_choose_min_chunk template struct _Parallel_choose_min_chunk { // parallel results collector which uses atomic to choose the lowest chunk's result @@ -453,7 +440,6 @@ struct _Parallel_choose_min_chunk { } }; -// STRUCT TEMPLATE _Parallel_choose_max_chunk template struct _Parallel_choose_max_chunk { // parallel results collector which uses atomic to choose the highest chunk's result @@ -488,7 +474,6 @@ struct _Parallel_choose_max_chunk { } }; -// CLASS TEMPLATE _Work_stealing_deque template struct alignas(_Ty) alignas(size_t) alignas(_Atomic_counter_t) _Circular_buffer { // work stealing deque extent type static_assert(is_trivial_v<_Ty>, "Work stealing deques work only with trivial operations"); @@ -674,7 +659,6 @@ private: }; #pragma warning(pop) -// STRUCT TEMPLATE _Work_stealing_membership enum class _Steal_result { _Success, _Abort, _Done }; template @@ -732,7 +716,6 @@ struct _Work_stealing_membership { // thread-local "ticket" that team members us } }; -// STRUCT TEMPLATE _Work_stealing_team template struct _Work_stealing_team { // inter-thread communication for threads working on a single task using _Diff = typename _Ty::difference_type; @@ -776,7 +759,6 @@ struct _Work_stealing_team { // inter-thread communication for threads working o priority_queue, greater<>> _Available_queues; }; -// STRUCT TEMPLATE _Static_partition_key template struct _Static_partition_key { // "pointer" identifying a static partition size_t _Chunk_number; // In range [0, numeric_limits<_Diff>::max()] @@ -788,7 +770,6 @@ struct _Static_partition_key { // "pointer" identifying a static partition } }; -// STRUCT TEMPLATE _Static_partition_team template struct _Static_partition_team { // common data for all static partitioned ops atomic _Consumed_chunks; @@ -838,14 +819,12 @@ struct _Static_partition_team { // common data for all static partitioned ops } }; -// STRUCT TEMPLATE _Iterator_range template struct _Iterator_range { // record of a partition of work _FwdIt _First; _FwdIt _Last; }; -// STRUCT TEMPLATE _Static_partition_range template , bool = _Is_random_iter_v<_FwdIt>> struct _Static_partition_range; @@ -966,7 +945,6 @@ struct _Static_partition_range<_FwdIt, _Diff, false> { } }; -// STRUCT TEMPLATE _Static_partition_range_backward template , bool = _Is_random_iter_v<_BidIt>> struct _Static_partition_range_backward; @@ -1024,7 +1002,6 @@ struct _Static_partition_range_backward<_BidIt, _Diff, false> { } }; -// FUNCTION TEMPLATE _Distance_any template _Common_diff_t<_InIt1, _InIt2> _Distance_any(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2) { // get the distance from 2 ranges which should have identical lengths @@ -1037,7 +1014,6 @@ _Common_diff_t<_InIt1, _InIt2> _Distance_any(_InIt1 _First1, _InIt1 _Last1, _InI } } -// FUNCTION TEMPLATE _Distance_min template _Common_diff_t<_InIt1, _InIt2> _Distance_min(_InIt1 _First1, const _InIt1 _Last1, _InIt2 _First2, const _InIt2 _Last2) { // get min(distance(_First1, _Last1), distance(_First2, _Last2)) @@ -1068,7 +1044,6 @@ _Common_diff_t<_InIt1, _InIt2> _Distance_min(_InIt1 _First1, const _InIt1 _Last1 return _Result; } -// PARALLEL FUNCTION TEMPLATE all_of template struct _Static_partitioned_all_of_family2 { // all_of/any_of/none_of task scheduled on the system thread pool _Static_partition_team<_Iter_diff_t<_FwdIt>> _Team; @@ -1150,7 +1125,6 @@ _NODISCARD bool all_of(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Pr _Pred) noexcept } } -// PARALLEL FUNCTION TEMPLATE any_of template /* = 0 */> _NODISCARD bool any_of(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, _Pr _Pred) noexcept /* terminates */ { // test if any element in [_First, _Last) satisfies _Pred with the indicated execution policy @@ -1165,7 +1139,6 @@ _NODISCARD bool any_of(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, _Pr _Pr } } -// PARALLEL FUNCTION TEMPLATE none_of template /* = 0 */> _NODISCARD bool none_of(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, _Pr _Pred) noexcept /* terminates */ { // test if no element in [_First, _Last) satisfies _Pred with the indicated execution policy @@ -1180,7 +1153,6 @@ _NODISCARD bool none_of(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, _Pr _P } } -// PARALLEL FUNCTION TEMPLATE for_each template void _For_each_ivdep(_FwdIt _First, const _FwdIt _Last, _Fn _Func) { // perform function for each element [_First, _Last) assuming independent loop bodies @@ -1251,7 +1223,6 @@ void for_each(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Fn _Func) noexcept /* termi } } -// PARALLEL FUNCTION TEMPLATE for_each_n template _FwdIt _For_each_n_ivdep(_FwdIt _First, _Diff _Count, _Fn _Func) { // perform function for each element [_First, _First + _Count) assuming independent loop bodies @@ -1300,7 +1271,6 @@ _FwdIt for_each_n(_ExPo&&, _FwdIt _First, const _Diff _Count_raw, _Fn _Func) noe return _First; } -// PARALLEL FUNCTION TEMPLATE find template using _Parallel_find_results = conditional_t<_Use_atomic_iterator<_FwdIt>, _Parallel_choose_min_result<_FwdIt>, _Parallel_choose_min_chunk<_FwdIt>>; @@ -1378,7 +1348,6 @@ _NODISCARD _FwdIt find(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, const _ return _First; } -// PARALLEL FUNCTION TEMPLATE find_if template /* = 0 */> _NODISCARD _FwdIt find_if(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, _Pr _Pred) noexcept /* terminates */ { // find first satisfying _Pred @@ -1392,7 +1361,6 @@ _NODISCARD _FwdIt find_if(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, _Pr return _First; } -// PARALLEL FUNCTION TEMPLATE find_if_not template /* = 0 */> _NODISCARD _FwdIt find_if_not(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, _Pr _Pred) noexcept /* terminates */ { // find first satisfying !_Pred @@ -1407,7 +1375,6 @@ _NODISCARD _FwdIt find_if_not(_ExPo&& _Exec, _FwdIt _First, const _FwdIt _Last, return _First; } -// PARALLEL FUNCTION TEMPLATE find_end template _Iter_diff_t<_FwdIt1> _Get_find_end_forward_partition_size( _FwdIt1 _First1, const _FwdIt1 _Last1, _FwdIt2 _First2, const _FwdIt2 _Last2) { @@ -1607,7 +1574,6 @@ _NODISCARD _FwdIt1 find_end(_ExPo&&, _FwdIt1 _First1, const _FwdIt1 _Last1, cons return _First1; } -// PARALLEL FUNCTION TEMPLATE find_first_of template /* = 0 */> _NODISCARD _FwdIt1 find_first_of(_ExPo&& _Exec, const _FwdIt1 _First1, _FwdIt1 _Last1, const _FwdIt2 _First2, const _FwdIt2 _Last2, _Pr _Pred) noexcept /* terminates */ { @@ -1630,7 +1596,6 @@ _NODISCARD _FwdIt1 find_first_of(_ExPo&& _Exec, const _FwdIt1 _First1, _FwdIt1 _ return _Last1; } -// PARALLEL FUNCTION TEMPLATE adjacent_find template struct _Static_partitioned_adjacent_find2 { _Static_partition_team<_Iter_diff_t<_FwdIt>> _Team; @@ -1703,7 +1668,6 @@ _NODISCARD _FwdIt adjacent_find(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Pr _Pred) return _Last; } -// PARALLEL FUNCTION TEMPLATES count AND count_if template struct _Static_partitioned_count_if2 { using _Diff = _Iter_diff_t<_FwdIt>; @@ -1779,7 +1743,6 @@ _NODISCARD _Iter_diff_t<_FwdIt> count(_ExPo&& _Exec, const _FwdIt _First, const [&_Val](auto&& _Iter_val) { return _STD forward(_Iter_val) == _Val; }); } -// PARALLEL FUNCTION TEMPLATE mismatch template >&& _Is_random_iter_v<_FwdIt2>, bool = _Use_atomic_iterator<_Unwrapped_t>&& _Is_random_iter_v<_FwdIt1>> @@ -1976,7 +1939,6 @@ _NODISCARD pair<_FwdIt1, _FwdIt2> mismatch( return {_First1, _First2}; } -// PARALLEL FUNCTION TEMPLATE equal template struct _Static_partitioned_equal2 { using _Diff = _Common_diff_t<_FwdIt1, _FwdIt2>; @@ -2091,7 +2053,6 @@ _NODISCARD bool equal(_ExPo&&, const _FwdIt1 _First1, const _FwdIt1 _Last1, cons return _STD equal(_UFirst1, _ULast1, _UFirst2, _ULast2, _Pass_fn(_Pred)); } -// PARALLEL FUNCTION TEMPLATE search template struct _Static_partitioned_search2 { _Static_partition_team<_Iter_diff_t<_FwdItHaystack>> _Team; @@ -2211,7 +2172,6 @@ _NODISCARD _FwdItHaystack search(_ExPo&&, const _FwdItHaystack _First1, _FwdItHa return _Last1; } -// PARALLEL FUNCTION TEMPLATE search_n template struct _Static_partitioned_search_n2 { _Static_partition_team<_Iter_diff_t<_FwdIt>> _Team; @@ -2309,7 +2269,6 @@ _NODISCARD _FwdIt search_n(_ExPo&&, const _FwdIt _First, _FwdIt _Last, const _Di return _Last; } -// PARALLEL FUNCTION TEMPLATE transform template struct _Static_partitioned_unary_transform2 { using _Diff = _Common_diff_t<_FwdIt1, _FwdIt2>; @@ -2466,7 +2425,6 @@ _FwdIt3 transform(_ExPo&&, const _FwdIt1 _First1, const _FwdIt1 _Last1, const _F } #pragma warning(pop) -// PARALLEL FUNCTION TEMPLATE replace template /* = 0 */> void replace(_ExPo&& _Exec, const _FwdIt _First, const _FwdIt _Last, const _Ty& _Oldval, const _Ty& _Newval) noexcept /* terminates */ { @@ -2479,7 +2437,6 @@ void replace(_ExPo&& _Exec, const _FwdIt _First, const _FwdIt _Last, const _Ty& }); } -// PARALLEL FUNCTION TEMPLATE replace_if template /* = 0 */> void replace_if(_ExPo&& _Exec, const _FwdIt _First, const _FwdIt _Last, _Pr _Pred, const _Ty& _Val) noexcept /* terminates */ { @@ -2493,7 +2450,6 @@ void replace_if(_ExPo&& _Exec, const _FwdIt _First, const _FwdIt _Last, _Pr _Pre }); } -// PARALLEL FUNCTION TEMPLATES remove AND remove_if template _FwdIt _Remove_move_if_unchecked(_FwdIt _First, const _FwdIt _Last, _FwdIt _Dest, _Pr _Pred) { // move omitting each element satisfying _Pred @@ -2640,7 +2596,6 @@ _NODISCARD _FwdIt remove(_ExPo&& _Exec, const _FwdIt _First, const _FwdIt _Last, [&_Val](auto&& _Lhs) { return _STD forward(_Lhs) == _Val; }); } -// PARALLEL FUNCTION TEMPLATE sort template struct _Sort_work_item_impl { // data describing an individual sort work item using difference_type = _Diff; @@ -2780,7 +2735,6 @@ void sort(_ExPo&&, const _RanIt _First, const _RanIt _Last, _Pr _Pred) noexcept _Sort_unchecked(_UFirst, _ULast, _Ideal, _Pass_fn(_Pred)); } -// PARALLEL FUNCTION TEMPLATE stable_sort template struct _Static_partitioned_temporary_buffer2 { _Optimistic_temporary_buffer<_Ty>& _Temp_buf; @@ -3043,7 +2997,6 @@ void stable_sort(_ExPo&&, const _BidIt _First, const _BidIt _Last, _Pr _Pred) no _Stable_sort_unchecked(_UFirst, _ULast, _Count, _Temp_buf._Data, _Temp_buf._Capacity, _Pass_fn(_Pred)); } -// PARALLEL FUNCTION TEMPLATE is_sorted_until template struct _Static_partitioned_is_sorted_until { _Static_partition_team<_Iter_diff_t<_FwdIt>> _Team; @@ -3119,7 +3072,6 @@ _NODISCARD _FwdIt is_sorted_until(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Pr _Pre return _First; } -// PARALLEL FUNCTION TEMPLATE is_partitioned inline constexpr unsigned char _Contains_counterexample = 0; inline constexpr unsigned char _Contains_true = 1; inline constexpr unsigned char _Contains_false = 2; @@ -3272,7 +3224,6 @@ _NODISCARD bool is_partitioned(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, return _STD is_partitioned(_UFirst, _ULast, _Pass_fn(_Pred)); } -// PARALLEL FUNCTION TEMPLATE is_heap_until template struct _Static_partitioned_is_heap_until { using _Diff = _Iter_diff_t<_RanIt>; @@ -3346,7 +3297,6 @@ _NODISCARD _RanIt is_heap_until(_ExPo&&, _RanIt _First, _RanIt _Last, _Pr _Pred) return _First; } -// PARALLEL FUNCTION TEMPLATE partition template pair<_FwdIt, _Iter_diff_t<_FwdIt>> _Partition_with_count_unchecked(_FwdIt _First, _FwdIt _Last, _Pr _Pred) { // move elements satisfying _Pred to front and track how many elements satisfy _Pred @@ -3594,7 +3544,6 @@ _FwdIt partition(_ExPo&&, _FwdIt _First, const _FwdIt _Last, _Pr _Pred) noexcept return _First; } -// PARALLEL FUNCTION TEMPLATE set_intersection inline constexpr unsigned char _Local_available = 1; inline constexpr unsigned char _Sum_available = 2; @@ -3939,7 +3888,6 @@ _FwdIt3 set_intersection(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _Firs return _Dest; } -// PARALLEL FUNCTION TEMPLATE set_difference struct _Set_difference_per_chunk { template _Common_diff_t<_RanIt1, _RanIt2, _RanIt3> _Update_dest( @@ -4029,7 +3977,6 @@ _FwdIt3 set_difference(_ExPo&&, _FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2 return _Dest; } -// PARALLEL FUNCTION TEMPLATE reduce template _Ty _Reduce_move_unchecked(_InIt _First, const _InIt _Last, _Ty _Val, _BinOp _Reduce_op) { // return reduction, choose optimization @@ -4134,7 +4081,6 @@ _NODISCARD _Ty reduce(_ExPo&&, const _FwdIt _First, const _FwdIt _Last, _Ty _Val return _STD reduce(_UFirst, _ULast, _STD move(_Val), _Pass_fn(_Reduce_op)); } -// PARALLEL FUNCTION TEMPLATE transform_reduce template struct _Static_partitioned_transform_reduce_binary2 { // transform-reduction task scheduled on the system thread pool using _Diff = _Common_diff_t<_FwdIt1, _FwdIt2>; @@ -4333,7 +4279,6 @@ _NODISCARD _Ty transform_reduce(_ExPo&&, const _FwdIt _First, const _FwdIt _Last return _STD transform_reduce(_UFirst, _ULast, _STD move(_Val), _Pass_fn(_Reduce_op), _Pass_fn(_Transform_op)); } -// PARALLEL FUNCTION TEMPLATE exclusive_scan struct _No_init_tag { explicit _No_init_tag() = default; }; // tag to indicate that no initial value is to be used @@ -4480,7 +4425,6 @@ _FwdIt2 exclusive_scan(_ExPo&&, const _FwdIt1 _First, const _FwdIt1 _Last, _FwdI return _Dest; } -// PARALLEL FUNCTION TEMPLATE inclusive_scan template _FwdIt2 _Inclusive_scan_per_chunk( _FwdIt1 _First, const _FwdIt1 _Last, _FwdIt2 _Dest, _BinOp _Reduce_op, _Ty& _Val, _No_init_tag) { @@ -4668,7 +4612,6 @@ _FwdIt2 inclusive_scan(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest, _B return _Dest; } -// PARALLEL FUNCTION TEMPLATE transform_exclusive_scan template _FwdIt2 _Transform_exclusive_scan_per_chunk( _FwdIt1 _First, const _FwdIt1 _Last, _FwdIt2 _Dest, _BinOp _Reduce_op, _UnaryOp _Transform_op, _Ty& _Val) { @@ -4814,7 +4757,6 @@ _FwdIt2 transform_exclusive_scan(_ExPo&&, const _FwdIt1 _First, const _FwdIt1 _L return _Dest; } -// PARALLEL FUNCTION TEMPLATE transform_inclusive_scan template _FwdIt2 _Transform_inclusive_scan_per_chunk(_FwdIt1 _First, const _FwdIt1 _Last, _FwdIt2 _Dest, _BinOp _Reduce_op, _UnaryOp _Transform_op, _Ty& _Val, _No_init_tag) { @@ -5011,7 +4953,6 @@ _FwdIt2 transform_inclusive_scan(_ExPo&&, const _FwdIt1 _First, const _FwdIt1 _L return _Dest; } -// PARALLEL FUNCTION TEMPLATE adjacent_difference template struct _Static_partitioned_adjacent_difference2 { using _Diff = _Common_diff_t<_FwdIt1, _FwdIt2>; diff --git a/stl/inc/experimental/coroutine b/stl/inc/experimental/coroutine index 062973090ba..ed2b37665a6 100644 --- a/stl/inc/experimental/coroutine +++ b/stl/inc/experimental/coroutine @@ -61,11 +61,9 @@ namespace experimental { using promise_type = typename _Ret::promise_type; }; - // STRUCT TEMPLATE coroutine_traits template struct coroutine_traits : _Coroutine_traits_sfinae<_Ret> {}; - // STRUCT TEMPLATE coroutine_handle template struct coroutine_handle; @@ -192,7 +190,6 @@ namespace experimental { } - // STRUCT suspend_if struct suspend_if { bool _Ready; @@ -207,7 +204,6 @@ namespace experimental { void await_resume() noexcept {} }; - // STRUCT suspend_always struct suspend_always { bool await_ready() noexcept { return false; @@ -218,7 +214,6 @@ namespace experimental { void await_resume() noexcept {} }; - // STRUCT suspend_never struct suspend_never { bool await_ready() noexcept { return true; diff --git a/stl/inc/experimental/deque b/stl/inc/experimental/deque index 3b0bf2eb361..d9452eeef2d 100644 --- a/stl/inc/experimental/deque +++ b/stl/inc/experimental/deque @@ -22,13 +22,11 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(deque<_Ty, _Alloc>& _Cont, _Pr _Pred) { _Erase_remove_if(_Cont, _Pass_fn(_Pred)); } - // FUNCTION TEMPLATE erase template _DEPRECATE_EXPERIMENTAL_ERASE void erase(deque<_Ty, _Alloc>& _Cont, const _Uty& _Val) { _Erase_remove(_Cont, _Val); diff --git a/stl/inc/experimental/filesystem b/stl/inc/experimental/filesystem index caea6224a2d..b693d00b01f 100644 --- a/stl/inc/experimental/filesystem +++ b/stl/inc/experimental/filesystem @@ -62,7 +62,6 @@ using _Pchar = wchar_t; // UTF16 struct _Char8_t; // flag for UTF8 -// ENUM file_type enum class file_type { // names for file types not_found = -1, none, @@ -76,7 +75,6 @@ enum class file_type { // names for file types unknown }; -// ENUM copy_options enum class copy_options { // names for copy options none = 0, skip_existing = 1, @@ -93,13 +91,11 @@ enum class copy_options { // names for copy options _BITMASK_OPS(copy_options) -// ENUM directory_options enum class directory_options { // names for directory options none = 0, follow_directory_symlink }; -// ENUM perms enum class perms { // names for permissions none = 0, owner_read = 0400, // S_IRUSR @@ -127,7 +123,6 @@ enum class perms { // names for permissions _BITMASK_OPS(perms) -// CLASS file_status class file_status { // stores file status public: explicit file_status(file_type _Ftype = file_type::none, perms _Prms = perms::unknown) noexcept @@ -160,7 +155,6 @@ private: perms _Myperms; }; -// STRUCT space_info struct space_info { // space information for a file uintmax_t capacity; uintmax_t free; @@ -197,7 +191,6 @@ _FS_DLL int __CLRCALL_PURE_OR_CDECL _Unlink(const wchar_t*); _FS_DLL int __CLRCALL_PURE_OR_CDECL _Copy_file(const wchar_t*, const wchar_t*); _FS_DLL int __CLRCALL_PURE_OR_CDECL _Chmod(const wchar_t*, perms); -// STRUCT TEMPLATE _Path_cvt template , class _Outalloc = allocator<_Outchar>> struct _Path_cvt { // converts among {char, wchar_t, UTF8, char16_t, char32_t} paths @@ -571,7 +564,6 @@ path system_complete(const path&, error_code&); path temp_directory_path(); path temp_directory_path(error_code&); -// CLASS TEMPLATE _Path_iterator template class _Path_iterator { public: @@ -731,7 +723,6 @@ private: size_t _Myoff; // current offset in full path }; -// CLASS path AND FRIENDS class path { // stores a pathname public: using value_type = _Pchar; @@ -743,8 +734,6 @@ public: path(const path& _Right) : _Mystr(_Right._Mystr) {} - // ARBITRARY SOURCE CONSTRUCT - template , int> = 0> path(_InIt _First, _InIt _Last) { using _Valty = _Iter_value_t<_InIt>; @@ -771,8 +760,6 @@ public: *this /= _Path_cvt<_Elem, value_type>::_Cvt(_Str_out, _Str.c_str(), _Str.size()); } - // ARBITRARY SOURCE CONSTRUCT, WITH LOCALE - template , int> = 0> path(_InIt _First, _InIt _Last, const locale& _Loc) { using _Valty = _Iter_value_t<_InIt>; @@ -1298,7 +1285,6 @@ basic_istream<_Elem, _Traits>& operator>>(basic_istream<_Elem, _Traits>& _Istr, return _Istr; } -// FUNCTION TEMPLATE u8path template , int> = 0> _NODISCARD path u8path(_InIt _First, _InIt _Last) { // make path from [_First, _Last) UTF8, given iterators string _Str(_First, _Last); @@ -1323,7 +1309,6 @@ _NODISCARD path u8path(const basic_string& _Str) { // mak return path(_Path_cvt<_Char8_t, _Pchar>::_Cvt(_Str_out, _Str.c_str(), _Str.size())); } -// CLASS filesystem_error AND FRIENDS class filesystem_error : public system_error { // base of all filesystem-error exceptions public: explicit filesystem_error( @@ -1376,7 +1361,6 @@ protected: _THROW(filesystem_error{_Message}); // centralize construction of temporary string } -// CLASS directory_entry AND FRIENDS class directory_entry { // represents a directory entry public: using string_type = _FSPFX path::string_type; @@ -1625,7 +1609,6 @@ _NODISCARD inline directory_iterator end(const directory_iterator&) noexcept { return {}; } -// CLASS recursive_directory_iterator class recursive_directory_iterator { public: using _Myiter = _Directory_iterator; diff --git a/stl/inc/experimental/forward_list b/stl/inc/experimental/forward_list index ec2323808a8..6ab53a637f1 100644 --- a/stl/inc/experimental/forward_list +++ b/stl/inc/experimental/forward_list @@ -22,13 +22,11 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(forward_list<_Ty, _Alloc>& _Cont, _Pr _Pred) { _Cont.remove_if(_Pass_fn(_Pred)); } - // FUNCTION TEMPLATE erase template _DEPRECATE_EXPERIMENTAL_ERASE void erase(forward_list<_Ty, _Alloc>& _Cont, const _Uty& _Val) { _Cont.remove_if([&](_Ty& _Elem) { return _Elem == _Val; }); diff --git a/stl/inc/experimental/list b/stl/inc/experimental/list index d4d1314bcf8..74da09a2674 100644 --- a/stl/inc/experimental/list +++ b/stl/inc/experimental/list @@ -22,13 +22,11 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(list<_Ty, _Alloc>& _Cont, _Pr _Pred) { _Cont.remove_if(_Pass_fn(_Pred)); } - // FUNCTION TEMPLATE erase template _DEPRECATE_EXPERIMENTAL_ERASE void erase(list<_Ty, _Alloc>& _Cont, const _Uty& _Val) { _Cont.remove_if([&](_Ty& _Elem) { return _Elem == _Val; }); diff --git a/stl/inc/experimental/map b/stl/inc/experimental/map index 3c5bab0cd3c..3aea2de141e 100644 --- a/stl/inc/experimental/map +++ b/stl/inc/experimental/map @@ -22,7 +22,6 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(map<_Kty, _Ty, _Keylt, _Alloc>& _Cont, _Pr _Pred) { _Erase_nodes_if(_Cont, _Pass_fn(_Pred)); diff --git a/stl/inc/experimental/resumable b/stl/inc/experimental/resumable index 0991c7c20d4..f8acaafe508 100644 --- a/stl/inc/experimental/resumable +++ b/stl/inc/experimental/resumable @@ -31,10 +31,8 @@ _STD_BEGIN namespace experimental { #ifndef __EDG__ - // STRUCT noop_coroutine_promise struct noop_coroutine_promise {}; - // STRUCT coroutine_handle template <> struct coroutine_handle : coroutine_handle<> { friend coroutine_handle noop_coroutine() noexcept; @@ -70,7 +68,6 @@ namespace experimental { // ALIAS noop_coroutine_handle using noop_coroutine_handle = coroutine_handle; - // FUNCTION noop_coroutine _NODISCARD inline noop_coroutine_handle noop_coroutine() noexcept { // Returns a handle to a coroutine that has no observable effects when resumed or destroyed. return noop_coroutine_handle{}; diff --git a/stl/inc/experimental/set b/stl/inc/experimental/set index 9fc738f5d49..60bf792a7d6 100644 --- a/stl/inc/experimental/set +++ b/stl/inc/experimental/set @@ -22,7 +22,6 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(set<_Kty, _Keylt, _Alloc>& _Cont, _Pr _Pred) { _Erase_nodes_if(_Cont, _Pass_fn(_Pred)); diff --git a/stl/inc/experimental/string b/stl/inc/experimental/string index a6bc3945435..e007b96416b 100644 --- a/stl/inc/experimental/string +++ b/stl/inc/experimental/string @@ -22,13 +22,11 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(basic_string<_Elem, _Traits, _Alloc>& _Cont, _Pr _Pred) { _Erase_remove_if(_Cont, _Pass_fn(_Pred)); } - // FUNCTION TEMPLATE erase template _DEPRECATE_EXPERIMENTAL_ERASE void erase(basic_string<_Elem, _Traits, _Alloc>& _Cont, const _Uty& _Val) { _Erase_remove(_Cont, _Val); diff --git a/stl/inc/experimental/unordered_map b/stl/inc/experimental/unordered_map index 106746b0e57..979db931daf 100644 --- a/stl/inc/experimental/unordered_map +++ b/stl/inc/experimental/unordered_map @@ -22,7 +22,6 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if( unordered_map<_Kty, _Ty, _Hasher, _Keyeq, _Alloc>& _Cont, _Pr _Pred) { diff --git a/stl/inc/experimental/unordered_set b/stl/inc/experimental/unordered_set index 44f4e6c4db5..69d6bbee7e5 100644 --- a/stl/inc/experimental/unordered_set +++ b/stl/inc/experimental/unordered_set @@ -22,7 +22,6 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(unordered_set<_Kty, _Hasher, _Keyeq, _Alloc>& _Cont, _Pr _Pred) { _Erase_nodes_if(_Cont, _Pass_fn(_Pred)); diff --git a/stl/inc/experimental/vector b/stl/inc/experimental/vector index e4422ebabd2..9dae0d7d3cc 100644 --- a/stl/inc/experimental/vector +++ b/stl/inc/experimental/vector @@ -22,13 +22,11 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(vector<_Ty, _Alloc>& _Cont, _Pr _Pred) { _Erase_remove_if(_Cont, _Pass_fn(_Pred)); } - // FUNCTION TEMPLATE erase template _DEPRECATE_EXPERIMENTAL_ERASE void erase(vector<_Ty, _Alloc>& _Cont, const _Uty& _Val) { _Erase_remove(_Cont, _Val); diff --git a/stl/inc/filesystem b/stl/inc/filesystem index 3c91851c797..a6281229aca 100644 --- a/stl/inc/filesystem +++ b/stl/inc/filesystem @@ -409,7 +409,6 @@ namespace filesystem { } } - // FUNCTION TEMPLATE _Unaligned_load template _NODISCARD _Ty _Unaligned_load(const void* _Ptr) { // load a _Ty from _Ptr static_assert(is_trivial_v<_Ty>, "Unaligned loads require trivial types"); @@ -674,7 +673,6 @@ namespace filesystem { } }; - // CLASS path template class _Path_iterator; @@ -1451,7 +1449,6 @@ namespace filesystem { return path(_Convert_range_to_wide(_First, _Last, _Utf8_conversion{})); } - // CLASS TEMPLATE _Path_iterator template class _Path_iterator { // almost bidirectional iterator for path public: @@ -1790,7 +1787,6 @@ namespace filesystem { return iterator(_Text.cend(), this); } - // CLASS filesystem_error class filesystem_error : public system_error { // base of all filesystem-error exceptions public: filesystem_error(const string& _Message, const error_code _Errcode) @@ -1872,7 +1868,6 @@ namespace filesystem { _THROW(filesystem_error(_Op, _Path1, _Path2, _Error)); } - // ENUM CLASS file_type enum class file_type { none, not_found, @@ -1892,7 +1887,6 @@ namespace filesystem { junction // implementation-defined value indicating an NT junction }; - // ENUM CLASS perms enum class perms { none = 0, @@ -1924,7 +1918,6 @@ namespace filesystem { _BITMASK_OPS(perms) - // ENUM CLASS copy_options enum class copy_options { none = static_cast(__std_fs_copy_options::_None), @@ -1949,7 +1942,6 @@ namespace filesystem { _BITMASK_OPS(copy_options) - // CLASS file_status class file_status { public: // [fs.file_status.cons], constructors and destructor @@ -2104,7 +2096,6 @@ namespace filesystem { return _Status.type() == file_type::symlink; } - // STRUCT _File_status_and_error struct _File_status_and_error { file_status _Status; __std_win_error _Error; @@ -2130,7 +2121,6 @@ namespace filesystem { using file_time_type = _CHRONO time_point; #endif // ^^^ !_HAS_CXX20 - // CLASS directory_entry class directory_entry { public: // [fs.dir.entry.cons], constructors and destructor @@ -2532,7 +2522,6 @@ namespace filesystem { filesystem::path _Path; }; - // ENUM CLASS directory_options enum class directory_options { none = 0, follow_directory_symlink = 1, skip_permission_denied = 2 }; _BITMASK_OPS(directory_options) @@ -2641,7 +2630,6 @@ namespace filesystem { class directory_iterator; class recursive_directory_iterator; - // STRUCT _Directory_entry_proxy struct _Directory_entry_proxy { _NODISCARD directory_entry operator*() && noexcept { return _STD move(_Entry); @@ -2656,7 +2644,6 @@ namespace filesystem { directory_entry _Entry; }; - // CLASS directory_iterator class directory_iterator { public: using iterator_category = input_iterator_tag; @@ -2875,7 +2862,6 @@ namespace filesystem { : _Dir_enum_impl(_STD move(_Create_data)), _Options(_Options_arg) {} }; - // CLASS recursive_directory_iterator class recursive_directory_iterator { public: using iterator_category = input_iterator_tag; @@ -2998,7 +2984,6 @@ namespace filesystem { return {}; } - // FUNCTION absolute _NODISCARD inline __std_win_error _Absolute(path& _Result, const wstring& _Text) { // pre: _Result.empty() if (_Text.empty()) { return __std_win_error::_Success; @@ -3041,7 +3026,6 @@ namespace filesystem { return _Result; } - // FUNCTION canonical _NODISCARD inline __std_win_error _Canonical(path& _Result, const wstring& _Text) { // pre: _Result.empty() if (_Text.empty()) { return __std_win_error::_Success; @@ -3116,7 +3100,6 @@ namespace filesystem { return _Result; } - // FUNCTION create_directory_symlink _NODISCARD inline unique_ptr _Get_cleaned_symlink_target(const path& _To) noexcept { // transforms /s in the root-name to \s, and all other directory-separators into single \s // example: a/\/b -> a\b @@ -3179,7 +3162,6 @@ namespace filesystem { } } - // FUNCTION create_hard_link inline void create_hard_link(const path& _To, const path& _New_hard_link) { // create a hard link for a file, _New_hard_link -> _To // note reversed parameter order: @@ -3195,7 +3177,6 @@ namespace filesystem { _Ec = _Make_ec(__std_fs_create_hard_link(_New_hard_link.c_str(), _To.c_str())); } - // FUNCTION create_symlink inline void create_symlink(const path& _To, const path& _New_symlink) { // create a symlink for a file, _New_symlink -> _To const auto _Cleaned = _Get_cleaned_symlink_target(_To); @@ -3221,7 +3202,6 @@ namespace filesystem { } } - // FUNCTION read_symlink _NODISCARD inline __std_win_error _Read_symlink_reparse_data( const _Fs_file& _Handle, unique_ptr& _Buffer_unique_ptr) noexcept { constexpr auto _Buffer_size = 16 * 1024 + sizeof(wchar_t); // MAXIMUM_REPARSE_DATA_BUFFER_SIZE + sizeof(wchar_t) @@ -3286,7 +3266,6 @@ namespace filesystem { return _Result; } - // FUNCTION copy_symlink _NODISCARD inline __std_win_error _Copy_symlink(const path& _Symlink, const path& _New_symlink) noexcept { __std_win_error _Err; unique_ptr _Buffer_unique_ptr; @@ -3342,7 +3321,6 @@ namespace filesystem { } } - // FUNCTION copy_file inline bool copy_file(const path& _From, const path& _To, const copy_options _Options, error_code& _Ec) noexcept /* strengthened */ { // copy a file _From -> _To according to _Options @@ -3373,7 +3351,6 @@ namespace filesystem { return _STD filesystem::copy_file(_From, _To, copy_options::none); } - // FUNCTION equivalent _NODISCARD inline pair<__std_win_error, bool> _Equivalent( const wchar_t* const _Lhs, const wchar_t* const _Rhs) noexcept { __std_fs_file_id _Left_id; @@ -3408,7 +3385,6 @@ namespace filesystem { return _Result.second; } - // FUNCTION exists _NODISCARD inline file_status status(const path& _Path); _NODISCARD inline file_status status(const path& _Path, error_code& _Ec) noexcept; _NODISCARD inline file_status symlink_status(const path& _Path); @@ -3434,7 +3410,6 @@ namespace filesystem { return _Result; } - // FUNCTION file_size _NODISCARD inline __std_win_error _File_size(const path& _Path, uintmax_t& _Result) noexcept { __std_fs_stats _Stats; const auto _Error = __std_fs_get_stats( @@ -3464,7 +3439,6 @@ namespace filesystem { return _Result; } - // FUNCTION hard_link_count _NODISCARD inline __std_win_error _Hard_link_count(const path& _Path, uintmax_t& _Result) noexcept { __std_fs_stats _Stats; const auto _Error = __std_fs_get_stats( @@ -3495,7 +3469,6 @@ namespace filesystem { return _Result; } - // FUNCTION is_block_file _NODISCARD inline bool is_block_file(const path&) noexcept /* strengthened */ { // tests whether the input path is a block special file (never on Windows) return false; @@ -3507,7 +3480,6 @@ namespace filesystem { return false; // note status sets _Ec to an error on nonexistent input } - // FUNCTION is_character_file _NODISCARD inline bool is_character_file(const path&) noexcept /* strengthened */ { // tests whether the input path is a character special file (never on Windows) return false; @@ -3519,7 +3491,6 @@ namespace filesystem { return false; // note status sets _Ec to an error on nonexistent input } - // FUNCTION is_directory _NODISCARD inline bool is_directory(const path& _Path) { // tests whether _Path is a directory return _STD filesystem::is_directory(_STD filesystem::status(_Path)); } @@ -3529,7 +3500,6 @@ namespace filesystem { return _STD filesystem::is_directory(_STD filesystem::status(_Path, _Ec)); } - // FUNCTION is_empty _NODISCARD inline bool is_empty(const path& _Path, error_code& _Ec) { // test whether _Path refers to a zero sized file or empty directory constexpr auto _Flags = __std_fs_stats_flags::_Attributes | __std_fs_stats_flags::_File_size @@ -3560,7 +3530,6 @@ namespace filesystem { return _Result; } - // FUNCTION is_fifo _NODISCARD inline bool is_fifo(const path&) noexcept /* strengthened */ { // tests whether the input path is a fifo (never on Windows) return false; @@ -3572,7 +3541,6 @@ namespace filesystem { return false; // note status sets _Ec to an error on nonexistent input } - // FUNCTION is_other _NODISCARD inline bool is_other(const path& _Path) { // tests whether _Path is an other file (such as a junction) return _STD filesystem::is_other(_STD filesystem::status(_Path)); } @@ -3582,7 +3550,6 @@ namespace filesystem { return _STD filesystem::is_other(_STD filesystem::status(_Path, _Ec)); } - // FUNCTION is_regular_file _NODISCARD inline bool is_regular_file(const path& _Path) { // tests whether _Path is a regular file return _STD filesystem::is_regular_file(_STD filesystem::status(_Path)); } @@ -3592,7 +3559,6 @@ namespace filesystem { return _STD filesystem::is_regular_file(_STD filesystem::status(_Path, _Ec)); } - // FUNCTION is_socket _NODISCARD inline bool is_socket(const path&) noexcept /* strengthened */ { // tests whether the input path is a socket (never on Windows) return false; @@ -3604,7 +3570,6 @@ namespace filesystem { return false; // note status sets _Ec to an error on nonexistent input } - // FUNCTION is_symlink _NODISCARD inline bool is_symlink(const path& _Path) { // tests whether _Path is a symlink return _STD filesystem::is_symlink(_STD filesystem::symlink_status(_Path)); } @@ -3613,7 +3578,6 @@ namespace filesystem { return _STD filesystem::is_symlink(_STD filesystem::symlink_status(_Path, _Ec)); } - // FUNCTION remove inline bool remove(const path& _Target) { // remove file _Target (even if it is a directory); returns whether the file was removed // note !exists(_Target) is not an error, and merely returns false @@ -3633,7 +3597,6 @@ namespace filesystem { return _Result._Removed; } - // FUNCTION rename inline void rename(const path& _Old_p, const path& _New_p) { // rename _Old_p to _New_p, overwriting _New_p if it is an existing non-directory file // the standard explicitly allows an implementation to not replace _New_p if it is a directory, @@ -3651,7 +3614,6 @@ namespace filesystem { _Ec = _Make_ec(__std_fs_rename(_Old_p.c_str(), _New_p.c_str())); } - // FUNCTION resize_file inline void resize_file(const path& _Target, const uintmax_t _New_size) { // set the size of _Target to _New_size const auto _Err = __std_fs_resize_file(_Target.c_str(), _New_size); @@ -3665,7 +3627,6 @@ namespace filesystem { _Ec = _Make_ec(__std_fs_resize_file(_Target.c_str(), _New_size)); } - // FUNCTION space struct space_info { uintmax_t capacity; uintmax_t free; @@ -3694,12 +3655,10 @@ namespace filesystem { return _Result; } - // FUNCTION status_known _NODISCARD inline bool status_known(const file_status _Status) noexcept { return _Status.type() != file_type::none; } - // FUNCTION status _NODISCARD inline _File_status_and_error _Get_any_status( const path& _Path, const __std_fs_stats_flags _Flags) noexcept { _File_status_and_error _Result; @@ -3726,7 +3685,6 @@ namespace filesystem { return _Result._Status; } - // FUNCTION symlink_status _NODISCARD inline file_status symlink_status(const path& _Path, error_code& _Ec) noexcept { const auto _Result = _Get_any_status(_Path, _Symlink_status_stats_flags); _Ec = _Make_ec(_Result._Error); @@ -3742,7 +3700,6 @@ namespace filesystem { return _Result._Status; } - // FUNCTION create_directory inline bool create_directory(const path& _Path) { const auto _Result = __std_fs_create_directory(_Path.c_str()); if (_Result._Error != __std_win_error::_Success) { @@ -3773,7 +3730,6 @@ namespace filesystem { return _Result._Created; } - // FUNCTION create_directories inline bool create_directories(const path& _Path, error_code& _Ec) { if (_Path.empty()) { _Ec = _Make_ec(__std_win_error::_Path_not_found); @@ -3844,7 +3800,6 @@ namespace filesystem { return _Result; } - // FUNCTION remove_all inline constexpr int _Remove_all_retry_count = 10; inline void _Remove_all_dir(const path& _Path, error_code& _Ec, uintmax_t& _Removed_count) { @@ -3921,7 +3876,6 @@ namespace filesystem { return _Removed_count; } - // FUNCTION last_write_time _NODISCARD inline __std_win_error _Last_write_time(const path& _Path, file_time_type& _Result) noexcept { __std_fs_stats _Stats; const auto _Error = __std_fs_get_stats( @@ -3964,7 +3918,6 @@ namespace filesystem { _Ec = _Make_ec(__std_fs_set_last_write_time(_New_time.time_since_epoch().count(), _Target.c_str())); } - // FUNCTION permissions enum class perm_options { replace = 0x1, add = 0x2, remove = 0x4, nofollow = 0x8 }; _BITMASK_OPS(perm_options) @@ -4023,7 +3976,6 @@ namespace filesystem { _STD filesystem::permissions(_Target, _Perms, perm_options::replace, _Ec); } - // FUNCTION temp_directory_path _NODISCARD inline path temp_directory_path(error_code& _Ec) { // get a location suitable for temporary storage, and verify that it is a directory _Ec.clear(); // for exception safety @@ -4050,7 +4002,6 @@ namespace filesystem { return _Result; } - // FUNCTION current_path _NODISCARD inline __std_win_error _Current_path(path& _Result) noexcept { _Result._Text.resize(__std_fs_max_path); for (;;) { @@ -4090,7 +4041,6 @@ namespace filesystem { } } - // FUNCTION weakly_canonical _NODISCARD inline path weakly_canonical(const path& _Input, error_code& _Ec) { // eventually calls GetFinalPathNameByHandleW _Ec.clear(); // for exception safety @@ -4153,7 +4103,6 @@ namespace filesystem { return _Result; } - // FUNCTION proximate _NODISCARD inline path proximate(const path& _Path, const path& _Base = _STD filesystem::current_path()) { // eventually calls GetFinalPathNameByHandleW const path _Weakly_canonical_path = _STD filesystem::weakly_canonical(_Path); @@ -4189,7 +4138,6 @@ namespace filesystem { return _STD filesystem::proximate(_Path, _Base, _Ec); } - // FUNCTION relative _NODISCARD inline path relative(const path& _Path, const path& _Base = _STD filesystem::current_path()) { // eventually calls GetFinalPathNameByHandleW const path _Weakly_canonical_path = _STD filesystem::weakly_canonical(_Path); @@ -4225,7 +4173,6 @@ namespace filesystem { return _STD filesystem::relative(_Path, _Base, _Ec); } - // FUNCTION copy inline void _Copy_impl( const directory_entry& _From, const path& _To, const copy_options _Options, error_code& _Ec) { // implement copy, does not clear _Ec for callers diff --git a/stl/inc/forward_list b/stl/inc/forward_list index 4071357aa96..b259d1a5fb1 100644 --- a/stl/inc/forward_list +++ b/stl/inc/forward_list @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Flist_unchecked_const_iterator template class _Flist_unchecked_const_iterator : public _Base { public: @@ -82,7 +81,6 @@ public: _Nodeptr _Ptr; // pointer to node }; -// CLASS TEMPLATE _Flist_unchecked_iterator template class _Flist_unchecked_iterator : public _Flist_unchecked_const_iterator<_Mylist> { public: @@ -117,7 +115,6 @@ public: } }; -// CLASS TEMPLATE _Flist_const_iterator template class _Flist_const_iterator : public _Flist_unchecked_const_iterator<_Mylist, _Iterator_base> { public: @@ -189,7 +186,6 @@ public: } }; -// CLASS TEMPLATE _Flist_iterator template class _Flist_iterator : public _Flist_const_iterator<_Mylist> { public: @@ -266,7 +262,6 @@ struct _Flist_simple_types : _Simple_types<_Ty> { using _Nodeptr = _Node*; }; -// CLASS TEMPLATE _Flist_val template class _Flist_val : public _Container_base { public: @@ -512,7 +507,6 @@ private: pointer _Head; // Points at the first constructed node. }; -// CLASS TEMPLATE forward_list template > class forward_list { // singly linked list private: diff --git a/stl/inc/fstream b/stl/inc/fstream index 7a5b704cfff..37df70a0e5c 100644 --- a/stl/inc/fstream +++ b/stl/inc/fstream @@ -67,7 +67,6 @@ extern _CRTIMP2_PURE FILE* __CLRCALL_PURE_OR_CDECL _Fiopen(const wchar_t*, ios_b extern _CRTIMP2_PURE FILE* __CLRCALL_PURE_OR_CDECL _Fiopen(const unsigned short*, ios_base::openmode, int); #endif // _NATIVE_WCHAR_T_DEFINED -// FUNCTION TEMPLATE _Fgetc template bool _Fgetc(_Elem& _Ch, FILE* _File) { // get an element from a C stream return _CSTD fread(&_Ch, sizeof(_Elem), 1, _File) == 1; @@ -108,7 +107,6 @@ inline bool _Fgetc(unsigned short& _Wchar, FILE* _File) { // get an unsigned sho } #endif // _NATIVE_WCHAR_T_DEFINED -// FUNCTION TEMPLATE _Fputc template bool _Fputc(_Elem _Ch, FILE* _File) { // put an element to a C stream return _CSTD fwrite(&_Ch, 1, sizeof(_Elem), _File) == sizeof(_Elem); @@ -131,7 +129,6 @@ inline bool _Fputc(unsigned short _Wchar, FILE* _File) { // put an unsigned shor } #endif // _NATIVE_WCHAR_T_DEFINED -// FUNCTION TEMPLATE _Ungetc template bool _Ungetc(const _Elem&, FILE*) { // put back an arbitrary element to a C stream (always fail) return false; @@ -164,7 +161,6 @@ inline bool _Ungetc(const unsigned short& _Wchar, FILE* _File) { // put back an } #endif // _NATIVE_WCHAR_T_DEFINED -// CLASS TEMPLATE basic_filebuf template class basic_filebuf : public basic_streambuf<_Elem, _Traits> { // stream buffer associated with a C stream public: @@ -806,7 +802,6 @@ void swap(basic_filebuf<_Elem, _Traits>& _Left, basic_filebuf<_Elem, _Traits>& _ _Left.swap(_Right); } -// CLASS TEMPLATE basic_ifstream template class basic_ifstream : public basic_istream<_Elem, _Traits> { // input stream associated with a C stream public: @@ -991,7 +986,6 @@ void swap(basic_ifstream<_Elem, _Traits>& _Left, basic_ifstream<_Elem, _Traits>& _Left.swap(_Right); } -// CLASS TEMPLATE basic_ofstream template class basic_ofstream : public basic_ostream<_Elem, _Traits> { // output stream associated with a C stream public: @@ -1175,7 +1169,6 @@ void swap(basic_ofstream<_Elem, _Traits>& _Left, basic_ofstream<_Elem, _Traits>& _Left.swap(_Right); } -// CLASS TEMPLATE basic_fstream template class basic_fstream : public basic_iostream<_Elem, _Traits> { // input/output stream associated with a C stream public: diff --git a/stl/inc/functional b/stl/inc/functional index dc2a4f7df86..1064c60f2a5 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -29,16 +29,7 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// STRUCT TEMPLATE plus -// defined in - -// STRUCT TEMPLATE minus -// defined in - -// STRUCT TEMPLATE multiplies -// defined in - -// STRUCT TEMPLATE divides +// plus, minus, and multiplies are defined in template struct divides { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -50,7 +41,6 @@ struct divides { } }; -// STRUCT TEMPLATE modulus template struct modulus { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -62,7 +52,6 @@ struct modulus { } }; -// STRUCT TEMPLATE negate template struct negate { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _ARGUMENT_TYPE_NAME; @@ -73,25 +62,8 @@ struct negate { } }; -// STRUCT TEMPLATE equal_to -// defined in - -// STRUCT TEMPLATE not_equal_to -// defined in - -// STRUCT TEMPLATE greater -// defined in - -// STRUCT TEMPLATE less -// defined in - -// STRUCT TEMPLATE greater_equal -// defined in - -// STRUCT TEMPLATE less_equal -// defined in +// equal_to, not_equal_to, greater, less, greater_equal, and less_equal are defined in -// STRUCT TEMPLATE logical_and template struct logical_and { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -103,7 +75,6 @@ struct logical_and { } }; -// STRUCT TEMPLATE logical_or template struct logical_or { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -115,7 +86,6 @@ struct logical_or { } }; -// STRUCT TEMPLATE logical_not template struct logical_not { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _ARGUMENT_TYPE_NAME; @@ -126,7 +96,6 @@ struct logical_not { } }; -// STRUCT TEMPLATE bit_and template struct bit_and { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -138,7 +107,6 @@ struct bit_and { } }; -// STRUCT TEMPLATE bit_or template struct bit_or { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -150,7 +118,6 @@ struct bit_or { } }; -// STRUCT TEMPLATE bit_xor template struct bit_xor { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -162,7 +129,6 @@ struct bit_xor { } }; -// STRUCT TEMPLATE bit_not template struct bit_not { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _ARGUMENT_TYPE_NAME; @@ -173,16 +139,8 @@ struct bit_not { } }; -// STRUCT TEMPLATE SPECIALIZATION plus -// defined in +// void specializations of plus, minus, and multiplies are defined in -// STRUCT TEMPLATE SPECIALIZATION minus -// defined in - -// STRUCT TEMPLATE SPECIALIZATION multiplies -// defined in - -// STRUCT TEMPLATE SPECIALIZATION divides template <> struct divides { template @@ -194,7 +152,6 @@ struct divides { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION modulus template <> struct modulus { template @@ -206,7 +163,6 @@ struct modulus { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION negate template <> struct negate { template @@ -217,25 +173,8 @@ struct negate { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION equal_to -// defined in - -// STRUCT TEMPLATE SPECIALIZATION not_equal_to -// defined in - -// STRUCT TEMPLATE SPECIALIZATION greater -// defined in - -// STRUCT TEMPLATE SPECIALIZATION less -// defined in - -// STRUCT TEMPLATE SPECIALIZATION greater_equal -// defined in - -// STRUCT TEMPLATE SPECIALIZATION less_equal -// defined in +// void specializations of equal_to, not_equal_to, greater, less, greater_equal, and less_equal are defined in -// STRUCT TEMPLATE SPECIALIZATION logical_and template <> struct logical_and { template @@ -247,7 +186,6 @@ struct logical_and { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION logical_or template <> struct logical_or { template @@ -259,7 +197,6 @@ struct logical_or { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION logical_not template <> struct logical_not { template @@ -270,7 +207,6 @@ struct logical_not { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION bit_and template <> struct bit_and { template @@ -282,7 +218,6 @@ struct bit_and { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION bit_or template <> struct bit_or { template @@ -294,7 +229,6 @@ struct bit_or { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION bit_xor template <> struct bit_xor { template @@ -306,7 +240,6 @@ struct bit_xor { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION bit_not template <> struct bit_not { template @@ -319,7 +252,6 @@ struct bit_not { #if _HAS_DEPRECATED_NEGATORS _STL_DISABLE_DEPRECATED_WARNING -// CLASS TEMPLATE unary_negate template class _CXX17_DEPRECATE_NEGATORS unary_negate { public: @@ -336,13 +268,11 @@ private: _Fn _Functor; }; -// FUNCTION TEMPLATE not1 template _CXX17_DEPRECATE_NEGATORS _NODISCARD constexpr unary_negate<_Fn> not1(const _Fn& _Func) { return unary_negate<_Fn>(_Func); } -// CLASS TEMPLATE binary_negate template class _CXX17_DEPRECATE_NEGATORS binary_negate { public: @@ -360,7 +290,6 @@ private: _Fn _Functor; }; -// FUNCTION TEMPLATE not2 template _CXX17_DEPRECATE_NEGATORS _NODISCARD constexpr binary_negate<_Fn> not2(const _Fn& _Func) { return binary_negate<_Fn>(_Func); @@ -370,7 +299,6 @@ _STL_RESTORE_DEPRECATED_WARNING #if _HAS_AUTO_PTR_ETC _STL_DISABLE_DEPRECATED_WARNING -// CLASS TEMPLATE binder1st template class binder1st : public unary_function { // functor adapter _Func(stored, right) @@ -394,14 +322,12 @@ protected: typename _Fn::first_argument_type value; // the left operand }; -// FUNCTION TEMPLATE bind1st template _NODISCARD binder1st<_Fn> bind1st(const _Fn& _Func, const _Ty& _Left) { typename _Fn::first_argument_type _Val(_Left); return binder1st<_Fn>(_Func, _Val); } -// CLASS TEMPLATE binder2nd template class binder2nd : public unary_function { // functor adapter _Func(left, stored) @@ -425,7 +351,6 @@ protected: typename _Fn::second_argument_type value; // the right operand }; -// FUNCTION TEMPLATE bind2nd template _NODISCARD binder2nd<_Fn> bind2nd(const _Fn& _Func, const _Ty& _Right) { typename _Fn::second_argument_type _Val(_Right); @@ -433,7 +358,6 @@ _NODISCARD binder2nd<_Fn> bind2nd(const _Fn& _Func, const _Ty& _Right) { } _STL_RESTORE_DEPRECATED_WARNING -// CLASS TEMPLATE pointer_to_unary_function template class pointer_to_unary_function : public unary_function<_Arg, _Result> { // functor adapter (*pfunc)(left) public: @@ -447,7 +371,6 @@ protected: _Fn _Pfun; // the function pointer }; -// CLASS TEMPLATE pointer_to_binary_function template class pointer_to_binary_function : public binary_function<_Arg1, _Arg2, _Result> { // functor adapter (*pfunc)(left, right) @@ -462,7 +385,6 @@ protected: _Fn _Pfun; // the function pointer }; -// FUNCTION TEMPLATE ptr_fun #define _PTR_FUN(CALL_OPT, X1, X2, X3) \ template \ _NODISCARD pointer_to_unary_function<_Arg, _Result, _Result(CALL_OPT*)(_Arg)> ptr_fun( \ @@ -478,7 +400,6 @@ protected: _NON_MEMBER_CALL(_PTR_FUN, X1, X2, X3) #undef _PTR_FUN -// CLASS TEMPLATE mem_fun_t template class mem_fun_t : public unary_function<_Ty*, _Result> { // functor adapter (*p->*pfunc)(), non-const *pfunc public: @@ -492,7 +413,6 @@ private: _Result (_Ty::*_Pmemfun)(); // the member function pointer }; -// CLASS TEMPLATE mem_fun1_t template class mem_fun1_t : public binary_function<_Ty*, _Arg, _Result> { // functor adapter (*p->*pfunc)(val), non-const *pfunc public: @@ -506,7 +426,6 @@ private: _Result (_Ty::*_Pmemfun)(_Arg); // the member function pointer }; -// CLASS TEMPLATE const_mem_fun_t template class const_mem_fun_t : public unary_function { // functor adapter (*p->*pfunc)(), const *pfunc public: @@ -520,7 +439,6 @@ private: _Result (_Ty::*_Pmemfun)() const; // the member function pointer }; -// CLASS TEMPLATE const_mem_fun1_t template class const_mem_fun1_t : public binary_function { // functor adapter (*p->*pfunc)(val), const *pfunc @@ -535,7 +453,6 @@ private: _Result (_Ty::*_Pmemfun)(_Arg) const; // the member function pointer }; -// FUNCTION TEMPLATE mem_fun template _NODISCARD mem_fun_t<_Result, _Ty> mem_fun(_Result (_Ty::*_Pm)()) { return mem_fun_t<_Result, _Ty>(_Pm); @@ -556,7 +473,6 @@ _NODISCARD const_mem_fun1_t<_Result, _Ty, _Arg> mem_fun(_Result (_Ty::*_Pm)(_Arg return const_mem_fun1_t<_Result, _Ty, _Arg>(_Pm); } -// CLASS TEMPLATE mem_fun_ref_t template class mem_fun_ref_t : public unary_function<_Ty, _Result> { // functor adapter (*left.*pfunc)(), non-const *pfunc public: @@ -570,7 +486,6 @@ private: _Result (_Ty::*_Pmemfun)(); // the member function pointer }; -// CLASS TEMPLATE mem_fun1_ref_t template class mem_fun1_ref_t : public binary_function<_Ty, _Arg, _Result> { // functor adapter (*left.*pfunc)(val), non-const *pfunc @@ -585,7 +500,6 @@ private: _Result (_Ty::*_Pmemfun)(_Arg); // the member function pointer }; -// CLASS TEMPLATE const_mem_fun_ref_t template class const_mem_fun_ref_t : public unary_function<_Ty, _Result> { // functor adapter (*left.*pfunc)(), const *pfunc public: @@ -599,7 +513,6 @@ private: _Result (_Ty::*_Pmemfun)() const; // the member function pointer }; -// CLASS TEMPLATE const_mem_fun1_ref_t template class const_mem_fun1_ref_t : public binary_function<_Ty, _Arg, _Result> { // functor adapter (*left.*pfunc)(val), const *pfunc @@ -614,7 +527,6 @@ private: _Result (_Ty::*_Pmemfun)(_Arg) const; // the member function pointer }; -// FUNCTION TEMPLATE mem_fun_ref template _NODISCARD mem_fun_ref_t<_Result, _Ty> mem_fun_ref(_Result (_Ty::*_Pm)()) { return mem_fun_ref_t<_Result, _Ty>(_Pm); @@ -636,7 +548,6 @@ _NODISCARD const_mem_fun1_ref_t<_Result, _Ty, _Arg> mem_fun_ref(_Result (_Ty::*_ } #endif // _HAS_AUTO_PTR_ETC -// FUNCTION TEMPLATE mem_fn template class _Mem_fn : public _Weak_types<_Memptr> { private: @@ -659,7 +570,6 @@ _NODISCARD _CONSTEXPR20 _Mem_fn<_Rx _Ty::*> mem_fn(_Rx _Ty::*_Pm) noexcept { } #if _HAS_CXX17 -// FUNCTION TEMPLATE not_fn struct _Not_fn_tag { explicit _Not_fn_tag() = default; }; @@ -717,7 +627,6 @@ _NODISCARD _CONSTEXPR20 _Not_fn> not_fn(_Callable&& _Obj) noe // IMPLEMENT function -// CLASS bad_function_call class bad_function_call : public exception { // exception thrown when an empty std::function is called public: bad_function_call() noexcept {} @@ -734,7 +643,6 @@ struct _Unforced { // tag to distinguish bind() from bind() explicit _Unforced() = default; }; -// STRUCT TEMPLATE _Invoker_ret // helper to give INVOKE an explicit return type; avoids undesirable Expression SFINAE template > struct _Invoker_ret { // selected for _Rx being cv void @@ -764,7 +672,6 @@ struct _Invoker_ret<_Unforced, false> { // selected for _Rx being _Unforced } }; -// FUNCTION TEMPLATE _Test_callable template class function; @@ -781,7 +688,6 @@ bool _Test_callable(const _Ty& _Arg) noexcept { // determine whether std::functi } } -// CLASS TEMPLATE _Func_base template class __declspec(novtable) _Func_base { // abstract base for implementation types public: @@ -814,7 +720,6 @@ _INLINE_VAR constexpr bool _Is_large = sizeof(_Impl) > _Space_size || alignof(_I || !_Impl::_Nothrow_move::value; #if _HAS_FUNCTION_ALLOCATOR_SUPPORT -// CLASS TEMPLATE _Func_impl template class _Func_impl final : public _Func_base<_Rx, _Types...> { // derived class for specific implementation types that use allocators @@ -884,7 +789,6 @@ private: }; #endif // _HAS_FUNCTION_ALLOCATOR_SUPPORT -// CLASS TEMPLATE _Func_impl_no_alloc template class _Func_impl_no_alloc final : public _Func_base<_Rx, _Types...> { // derived class for specific implementation types that don't use allocators @@ -948,7 +852,6 @@ private: #define _USE_FUNCTION_INT_0_SFINAE 1 #endif // __CUDACC__ -// CLASS TEMPLATE _Func_class template class _Func_class : public _Arg_types<_Types...> { public: @@ -1093,7 +996,6 @@ private: } }; -// STRUCT TEMPLATE _Get_function_impl template struct _Get_function_impl { static_assert(_Always_false<_Tx>, "std::function does not accept non-function types as template arguments."); @@ -1119,7 +1021,6 @@ _NON_MEMBER_CALL(_GET_FUNCTION_IMPL_NOEXCEPT, X1, X2, X3) #undef _GET_FUNCTION_IMPL_NOEXCEPT #endif // __cpp_noexcept_function_type -// CLASS TEMPLATE function template class function : public _Get_function_impl<_Fty>::type { // wrapper for callable objects private: @@ -1259,7 +1160,6 @@ public: _NON_MEMBER_CALL(_FUNCTION_POINTER_DEDUCTION_GUIDE, X1, X2, X3) #undef _FUNCTION_POINTER_DEDUCTION_GUIDE -// STRUCT TEMPLATE _Deduce_signature template struct _Deduce_signature {}; // can't deduce signature when &_Fx::operator() is missing, inaccessible, or ambiguous @@ -1322,11 +1222,9 @@ struct is_placeholder : is_placeholder<_Tx>::type {}; // ign template _INLINE_VAR constexpr int is_placeholder_v = is_placeholder<_Ty>::value; -// CLASS TEMPLATE _Binder FORWARD DECLARATION template class _Binder; -// STRUCT TEMPLATE is_bind_expression template struct is_bind_expression : false_type {}; // _Tx is not a bind expression @@ -1345,7 +1243,6 @@ struct is_bind_expression : is_bind_expression<_Tx>::type {} template _INLINE_VAR constexpr bool is_bind_expression_v = is_bind_expression<_Ty>::value; -// FUNCTION TEMPLATE _Fix_arg template , reference_wrapper>, bool = is_bind_expression_v<_Cv_TiD>, int = is_placeholder_v<_Cv_TiD>> struct _Select_fixer; @@ -1404,7 +1301,6 @@ constexpr auto _Fix_arg(_Cv_TiD& _Tid, _Untuple&& _Ut) noexcept( return _Select_fixer<_Cv_TiD>::_Fix(_Tid, _STD move(_Ut)); } -// FUNCTION TEMPLATE _Call_binder template _CONSTEXPR20 auto _Call_binder(_Invoker_ret<_Ret>, index_sequence<_Ix...>, _Cv_FD& _Obj, _Cv_tuple_TiD& _Tpl, _Untuple&& _Ut) noexcept(noexcept(_Invoker_ret<_Ret>::_Call(_Obj, @@ -1414,7 +1310,6 @@ _CONSTEXPR20 auto _Call_binder(_Invoker_ret<_Ret>, index_sequence<_Ix...>, _Cv_F return _Invoker_ret<_Ret>::_Call(_Obj, _Fix_arg(_STD get<_Ix>(_Tpl), _STD move(_Ut))...); } -// CLASS TEMPLATE _Binder template struct _Forced_result_type { // used by bind() _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ret _RESULT_TYPE_NAME; @@ -1461,13 +1356,11 @@ public: #undef _CALL_BINDER }; -// FUNCTION TEMPLATE bind (implicit return type) template _NODISCARD _CONSTEXPR20 _Binder<_Unforced, _Fx, _Types...> bind(_Fx&& _Func, _Types&&... _Args) { return _Binder<_Unforced, _Fx, _Types...>(_STD forward<_Fx>(_Func), _STD forward<_Types>(_Args)...); } -// FUNCTION TEMPLATE bind (explicit return type) template _NODISCARD _CONSTEXPR20 _Binder<_Ret, _Fx, _Types...> bind(_Fx&& _Func, _Types&&... _Args) { return _Binder<_Ret, _Fx, _Types...>(_STD forward<_Fx>(_Func), _STD forward<_Types>(_Args)...); @@ -1498,7 +1391,6 @@ namespace placeholders { } // namespace placeholders #if _HAS_CXX20 -// FUNCTION TEMPLATE _Call_front_binder template constexpr auto _Call_front_binder(index_sequence<_Ix...>, _Cv_FD&& _Obj, _Cv_tuple_TiD&& _Tpl, _Unbound&&... _Unbargs) noexcept(noexcept(_STD invoke(_STD forward<_Cv_FD>(_Obj), @@ -1509,7 +1401,6 @@ constexpr auto _Call_front_binder(index_sequence<_Ix...>, _Cv_FD&& _Obj, _Cv_tup _STD forward<_Unbound>(_Unbargs)...); } -// CLASS TEMPLATE _Front_binder template class _Front_binder { // wrap bound callable object and arguments private: @@ -1561,7 +1452,6 @@ public: } }; -// FUNCTION TEMPLATE bind_front template _NODISCARD constexpr auto bind_front(_Fx&& _Func, _Types&&... _Args) { static_assert(is_constructible_v, _Fx>, @@ -1578,7 +1468,6 @@ _NODISCARD constexpr auto bind_front(_Fx&& _Func, _Types&&... _Args) { #endif // _HAS_CXX20 #if _HAS_FUNCTION_ALLOCATOR_SUPPORT -// STRUCT TEMPLATE uses_allocator template struct uses_allocator, _Alloc> : true_type {}; // true_type if container allocator enabled #endif // _HAS_FUNCTION_ALLOCATOR_SUPPORT @@ -1626,14 +1515,12 @@ _Ty* _Decode_aligned_block(void*& _Base, const size_t _Count) { return static_cast<_Ty*>(_Decode_aligned_block(_Base, sizeof(_Ty) * _Count, alignof(_Ty))); } -// STRUCT _Global_delete struct _Global_delete { void operator()(void* const _Ptr) const { ::operator delete(_Ptr); } }; -// CLASS TEMPLATE default_searcher template _CONSTEXPR20 pair<_FwdItHaystack, _FwdItHaystack> _Search_pair_unchecked(_FwdItHaystack _First1, _FwdItHaystack _Last1, _FwdItPat _First2, _FwdItPat _Last2, _Pred_eq& _Eq, forward_iterator_tag, forward_iterator_tag) { @@ -1709,7 +1596,6 @@ private: }; -// STRUCT TEMPLATE _Boyer_moore_hash_delta_1_table template struct _Boyer_moore_hash_delta_1_table { // stores the Boyer-Moore delta_1 table using a hash table using _Value_t = _Iter_value_t<_RanItPat>; @@ -1746,7 +1632,6 @@ private: }; -// STRUCT TEMPLATE _Boyer_moore_flat_delta_1_table template _Limit> struct _Boyer_moore_flat_delta_1_table { // stores the Boyer-Moore delta_1 table using a plain array lookup using _Value_t = _Iter_value_t<_RanItPat>; @@ -1782,7 +1667,6 @@ private: }; -// FUNCTION TEMPLATE _Build_boyer_moore_delta_2_table template void _Build_boyer_moore_delta_2_table(_Iter_diff_t<_RanItPat>* const _Shifts, const _RanItPat _Pat_first, const _Iter_diff_t<_RanItPat> _Pat_size, _Pred_eq& _Eq) { @@ -1844,7 +1728,6 @@ void _Build_boyer_moore_delta_2_table(_Iter_diff_t<_RanItPat>* const _Shifts, co } -// FUNCTION TEMPLATE _Boyer_moore_search template pair<_RanItHaystack, _RanItHaystack> _Boyer_moore_search( const _Delta1_t& _Delta1, typename _Delta1_t::_Diff* _Delta2, _RanItHaystack _First, _RanItHaystack _Last) { @@ -1887,7 +1770,6 @@ pair<_RanItHaystack, _RanItHaystack> _Boyer_moore_search( } -// FUNCTION TEMPLATE _Boyer_moore_horspool_search template pair<_RanItHaystack, _RanItHaystack> _Boyer_moore_horspool_search( const _Delta1_t& _Delta1, _RanItHaystack _First, _RanItHaystack _Last) { @@ -1926,7 +1808,6 @@ pair<_RanItHaystack, _RanItHaystack> _Boyer_moore_horspool_search( } -// STRUCT AND ALIAS TEMPLATES _Boyer_moore_traits template struct _Single_delta1_type_boyer_moore_traits { using _Diff = _Iter_diff_t<_RanItPat>; @@ -2133,7 +2014,6 @@ using _Boyer_moore_traits = _Boyer_moore_traits_general_mode<_RanItPat, _Hash_ty, _Pred_eq>>; -// CLASS TEMPLATE boyer_moore_searcher template >, class _Pred_eq = equal_to<>> class boyer_moore_searcher { public: @@ -2173,7 +2053,6 @@ private: }; -// CLASS TEMPLATE boyer_moore_horspool_searcher template >, class _Pred_eq = equal_to<>> class boyer_moore_horspool_searcher { // equivalent to Boyer-Moore without the second table public: @@ -2215,7 +2094,6 @@ private: #ifdef __cpp_lib_concepts namespace ranges { - // STRUCT ranges::not_equal_to struct not_equal_to { // clang-format off template @@ -2229,7 +2107,6 @@ namespace ranges { using is_transparent = int; }; - // STRUCT ranges::greater_equal struct greater_equal { // clang-format off template @@ -2243,7 +2120,6 @@ namespace ranges { using is_transparent = int; }; - // STRUCT ranges::less_equal struct less_equal { // clang-format off template diff --git a/stl/inc/future b/stl/inc/future index b14aa5b44fe..81098872fe5 100644 --- a/stl/inc/future +++ b/stl/inc/future @@ -35,7 +35,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// FUNCTION TEMPLATE _Make_unique_alloc template struct _Allocator_deleter { _Alloc _Al; @@ -59,10 +58,8 @@ _NODISCARD _Unique_ptr_alloc<_Alloc> _Make_unique_alloc(_Alloc& _Al, _Args&&... return _Unique_ptr_alloc<_Alloc>(_Constructor._Release(), _Allocator_deleter<_Alloc>{_Al}); } -// STRUCT _Nil struct _Nil {}; // empty struct, for unused argument types -// ENUM future_errc enum class future_errc { // names for futures errors broken_promise = 1, future_already_retrieved, @@ -70,7 +67,6 @@ enum class future_errc { // names for futures errors no_state }; -// ENUM launch enum class launch { // names for launch options passed to async async = 0x1, deferred = 0x2 @@ -78,7 +74,6 @@ enum class launch { // names for launch options passed to async _BITMASK_OPS(launch) -// ENUM future_status enum class future_status { // names for timed wait function returns ready, timeout, @@ -89,7 +84,6 @@ enum class future_status { // names for timed wait function returns [[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Throw_future_error(const error_code& _Code); [[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Rethrow_future_exception(exception_ptr _Ptr); -// STRUCT TEMPLATE SPECIALIZATION is_error_code_enum template <> struct is_error_code_enum : true_type {}; @@ -103,7 +97,6 @@ _NODISCARD inline error_condition make_error_condition(future_errc _Errno) noexc return error_condition(static_cast(_Errno), _STD future_category()); } -// CLASS future_error inline const char* _Future_error_map(int _Errcode) noexcept { // convert to name of future error switch (static_cast(_Errcode)) { // switch on error code value case future_errc::broken_promise: @@ -171,7 +164,6 @@ _NODISCARD inline const error_category& future_category() noexcept { return _Immortalize_memcpy_image<_Future_error_category2>(); } -// STRUCT TEMPLATE _State_deleter template class _Associated_state; @@ -193,7 +185,6 @@ struct _State_deleter : _Deleter_base<_Ty> { // manage allocator and deletion st _Alloc _My_alloc; }; -// CLASS TEMPLATE _Associated_state template class _Associated_state { // class for managing associated synchronous state public: @@ -451,7 +442,6 @@ void _State_deleter<_Ty, _Derived, _Alloc>::_Delete( _Delete_plain_internal(_Del_alloc, this); } -// CLASS TEMPLATE _Packaged_state template class _Packaged_state; @@ -648,7 +638,6 @@ _Pack_state* _Make_packaged_state(_Fty2&& _Fnarg, const _Alloc& _Al) { } #endif // _HAS_FUNCTION_ALLOCATOR_SUPPORT -// CLASS TEMPLATE _Deferred_async_state template class _Deferred_async_state : public _Packaged_state<_Rx()> { // class for managing associated synchronous state for deferred execution from async @@ -672,7 +661,6 @@ private: } }; -// CLASS TEMPLATE _Task_async_state template class _Task_async_state : public _Packaged_state<_Rx()> { // class for managing associated synchronous state for asynchronous execution from async @@ -707,7 +695,6 @@ private: ::Concurrency::task _Task; }; -// CLASS TEMPLATE _State_manager template class _State_manager { // class for managing possibly non-existent associated asynchronous state object @@ -867,7 +854,6 @@ private: bool _Get_only_once; }; -// CLASS TEMPLATE future template class shared_future; @@ -971,7 +957,6 @@ public: future& operator=(const future&) = delete; }; -// CLASS TEMPLATE shared_future template class shared_future : public _State_manager<_Ty> { // class that defines a copyable asynchronous return object that holds a value @@ -1075,7 +1060,6 @@ _NODISCARD inline shared_future future::share() noexcept { return shared_future(_STD move(*this)); } -// CLASS TEMPLATE _Promise template class _Promise { public: @@ -1144,7 +1128,6 @@ private: bool _Future_retrieved; }; -// CLASS TEMPLATE promise template class promise { // class that defines an asynchronous provider that holds a value public: @@ -1326,7 +1309,6 @@ void swap(promise<_Ty>& _Left, promise<_Ty>& _Right) noexcept { _Left.swap(_Right); } -// CLASS TEMPLATE packaged_task template struct _P_arg_type { // type for functions returning T using type = _Fret; @@ -1450,21 +1432,18 @@ void swap(packaged_task<_Ty>& _Left, packaged_task<_Ty>& _Right) noexcept { _Left.swap(_Right); } -// FUNCTION TEMPLATE _Invoke_stored_explicit template auto _Invoke_stored_explicit(tuple<_Types...>&& _Tuple, index_sequence<_Indices...>) -> decltype(_STD invoke( _STD get<_Indices>(_STD move(_Tuple))...)) { // invoke() a tuple with explicit parameter ordering return _STD invoke(_STD get<_Indices>(_STD move(_Tuple))...); } -// FUNCTION TEMPLATE _Invoke_stored template auto _Invoke_stored(tuple<_Types...>&& _Tuple) -> decltype(_Invoke_stored_explicit(_STD move(_Tuple), index_sequence_for<_Types...>{})) { // invoke() a tuple return _Invoke_stored_explicit(_STD move(_Tuple), index_sequence_for<_Types...>{}); } -// FUNCTION TEMPLATE async template class _Fake_no_copy_callable_adapter { // async() is built on packaged_task internals which incorrectly use diff --git a/stl/inc/hash_map b/stl/inc/hash_map index d2fc7b3f49d..d2075b93179 100644 --- a/stl/inc/hash_map +++ b/stl/inc/hash_map @@ -33,7 +33,6 @@ namespace stdext { using _STD _Swap_adl; using _STD _Xout_of_range; - // CLASS TEMPLATE _Hmap_traits template >, class _Alloc = allocator>> class hash_map : public _Hash<_Hmap_traits<_Kty, _Ty, _Tr, _Alloc, false>> { @@ -300,7 +298,6 @@ namespace stdext { return !(_Left == _Right); } - // CLASS TEMPLATE hash_multimap template >, class _Alloc = allocator>> class hash_multimap : public _Hash<_Hmap_traits<_Kty, _Ty, _Tr, _Alloc, true>> { diff --git a/stl/inc/hash_set b/stl/inc/hash_set index 7a3a4214318..850b4f14da3 100644 --- a/stl/inc/hash_set +++ b/stl/inc/hash_set @@ -29,7 +29,6 @@ namespace stdext { using _STD _Is_nothrow_swappable; using _STD _Swap_adl; - // CLASS TEMPLATE _Hset_traits template >, class _Alloc = allocator<_Kty>> class hash_set : public _Hash<_Hset_traits<_Kty, _Tr, _Alloc, false>> { // hash table of key values, unique keys public: @@ -233,7 +231,6 @@ namespace stdext { return !(_Left == _Right); } - // CLASS TEMPLATE hash_multiset template >, class _Alloc = allocator<_Kty>> class hash_multiset : public _Hash<_Hset_traits<_Kty, _Tr, _Alloc, true>> { // hash table of key values, non-unique keys diff --git a/stl/inc/initializer_list b/stl/inc/initializer_list index a692057e2fe..2714f3d3785 100644 --- a/stl/inc/initializer_list +++ b/stl/inc/initializer_list @@ -18,7 +18,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE initializer_list template class initializer_list { public: @@ -52,13 +51,11 @@ private: const _Elem* _Last; }; -// FUNCTION TEMPLATE begin template _NODISCARD constexpr const _Elem* begin(initializer_list<_Elem> _Ilist) noexcept { return _Ilist.begin(); } -// FUNCTION TEMPLATE end template _NODISCARD constexpr const _Elem* end(initializer_list<_Elem> _Ilist) noexcept { return _Ilist.end(); diff --git a/stl/inc/iomanip b/stl/inc/iomanip index 2049d1d3106..0d5827e7c65 100644 --- a/stl/inc/iomanip +++ b/stl/inc/iomanip @@ -21,7 +21,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// STRUCT TEMPLATE _Fillobj template struct _Fillobj { // store fill character _Fillobj(_Elem _Ch) : _Fill(_Ch) {} @@ -29,7 +28,6 @@ struct _Fillobj { // store fill character _Elem _Fill; // the fill character }; -// FUNCTION TEMPLATE setfill template _NODISCARD _Fillobj<_Elem> setfill(_Elem _Ch) { return _Fillobj<_Elem>(_Ch); @@ -53,7 +51,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Ostr; } -// STRUCT TEMPLATE _Monobj template struct _Monobj { // store reference to monetary amount _Monobj(_Money& _Val_arg, bool _Intl_arg) : _Val(_Val_arg), _Intl(_Intl_arg) {} @@ -64,7 +61,6 @@ struct _Monobj { // store reference to monetary amount _Monobj& operator=(const _Monobj&) = delete; }; -// FUNCTION TEMPLATE get_money template _NODISCARD _Monobj<_Money> get_money(_Money& _Val_arg, bool _Intl_arg = false) { return _Monobj<_Money>(_Val_arg, _Intl_arg); @@ -91,7 +87,6 @@ basic_istream<_Elem, _Traits>& operator>>(basic_istream<_Elem, _Traits>& _Istr, return _Istr; } -// FUNCTION TEMPLATE put_money template _NODISCARD _Monobj put_money(const _Money& _Val_arg, bool _Intl_arg = false) { return _Monobj(_Val_arg, _Intl_arg); @@ -120,7 +115,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Ostr; } -// STRUCT TEMPLATE _Timeobj template struct _Timeobj { // store reference to tm object and format _Timeobj(_Ptr _Tptr_arg, const _Elem* _Fmt_arg) : _Tptr(_Tptr_arg), _Fmtfirst(_Fmt_arg) { @@ -133,7 +127,6 @@ struct _Timeobj { // store reference to tm object and format const _Elem* _Fmtlast; // format string end }; -// FUNCTION TEMPLATE get_time template _NODISCARD _Timeobj<_Elem, tm*> get_time(tm* _Tptr_arg, const _Elem* _Fmt_arg) { return _Timeobj<_Elem, tm*>(_Tptr_arg, _Fmt_arg); @@ -163,7 +156,6 @@ basic_istream<_Elem, _Traits>& operator>>(basic_istream<_Elem, _Traits>& _Istr, return _Istr; } -// FUNCTION TEMPLATE put_time template _NODISCARD _Timeobj<_Elem, const tm*> put_time(const tm* _Tptr_arg, const _Elem* _Fmt_arg) { return _Timeobj<_Elem, const tm*>(_Tptr_arg, _Fmt_arg); @@ -193,7 +185,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Ostr; } -// STRUCT TEMPLATE _Quote_in template struct _Quote_in { // store reference to string using _Mystr = basic_string<_Elem, _Traits, _Alloc>; @@ -208,7 +199,6 @@ struct _Quote_in { // store reference to string _Quote_in& operator=(const _Quote_in&) = delete; }; -// STRUCT TEMPLATE _Quote_out template struct _Quote_out { // store pointer/length for string _Quote_out(const _Elem* _Ptr_obj, _Sizet _Size_obj, _Elem _Delim_obj, _Elem _Escape_obj) @@ -222,7 +212,6 @@ struct _Quote_out { // store pointer/length for string _Quote_out& operator=(const _Quote_out&) = delete; }; -// FUNCTION TEMPLATE quoted template _NODISCARD _Quote_out<_Elem, void, size_t> quoted( const _Elem* _Ptr, _Elem _Delim = _Elem('"'), _Elem _Escape = _Elem('\\')) { @@ -400,7 +389,6 @@ basic_istream<_Elem, _Traits>& operator>>(basic_istream<_Elem, _Traits>& _Istr, return _Istr; } -// STRUCT TEMPLATE _Smanip template struct _Smanip { // store function pointer and argument value _Smanip(void(__cdecl* _Left)(ios_base&, _Arg), _Arg _Val) : _Pfun(_Left), _Manarg(_Val) {} diff --git a/stl/inc/ios b/stl/inc/ios index fb85b460508..d6edab7d9b5 100644 --- a/stl/inc/ios +++ b/stl/inc/ios @@ -18,7 +18,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE basic_ios template class basic_ios : public ios_base { // base class for basic_istream/basic_ostream public: diff --git a/stl/inc/iosfwd b/stl/inc/iosfwd index 0aec6258a95..79034638f5e 100644 --- a/stl/inc/iosfwd +++ b/stl/inc/iosfwd @@ -48,7 +48,6 @@ _STD_BEGIN using streamoff = long long; using streamsize = long long; -// CLASS TEMPLATE fpos (from ) template class fpos { // store arbitrary file position public: diff --git a/stl/inc/iostream b/stl/inc/iostream index 6a19dab8865..e55c71a7a2a 100644 --- a/stl/inc/iostream +++ b/stl/inc/iostream @@ -55,7 +55,6 @@ __PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream* _Ptr_wcout; __PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream* _Ptr_wcerr; __PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream* _Ptr_wclog; -// CLASS _Winit class _CRTIMP2_PURE_IMPORT _Winit { public: __thiscall _Winit(); diff --git a/stl/inc/istream b/stl/inc/istream index 62b687c23a2..8c366e6c85a 100644 --- a/stl/inc/istream +++ b/stl/inc/istream @@ -20,7 +20,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN #pragma vtordisp(push, 2) // compiler bug workaround -// CLASS TEMPLATE basic_istream template class basic_istream : virtual public basic_ios<_Elem, _Traits> { // control extractions from a stream buffer public: @@ -75,7 +74,6 @@ public: using pos_type = typename _Traits::pos_type; using off_type = typename _Traits::off_type; - // CLASS TEMPLATE sentry class _Sentry_base { public: __CLR_OR_THIS_CALL _Sentry_base(basic_istream& _Istr) : _Myistr(_Istr) { @@ -705,7 +703,6 @@ template class _CRTIMP2_PURE_IMPORT basic_istream class basic_iostream : public basic_istream<_Elem, _Traits>, public basic_ostream<_Elem, _Traits> { // control insertions and extractions from a stream buffer diff --git a/stl/inc/iterator b/stl/inc/iterator index 824b3bb6c5f..a9900a0eced 100644 --- a/stl/inc/iterator +++ b/stl/inc/iterator @@ -19,7 +19,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE back_insert_iterator template class back_insert_iterator { // wrap pushes to back of container as output iterator public: @@ -65,14 +64,12 @@ protected: _Container* container; }; -// FUNCTION TEMPLATE back_inserter template _NODISCARD _CONSTEXPR20 back_insert_iterator<_Container> back_inserter(_Container& _Cont) noexcept /* strengthened */ { // return a back_insert_iterator return back_insert_iterator<_Container>(_Cont); } -// CLASS TEMPLATE front_insert_iterator template class front_insert_iterator { // wrap pushes to front of container as output iterator public: @@ -118,13 +115,11 @@ protected: _Container* container; }; -// FUNCTION TEMPLATE front_inserter template _NODISCARD _CONSTEXPR20 front_insert_iterator<_Container> front_inserter(_Container& _Cont) { return front_insert_iterator<_Container>(_Cont); } -// CLASS TEMPLATE insert_iterator template class insert_iterator { // wrap inserts into container as output iterator public: @@ -175,14 +170,12 @@ protected: _Wrapped_iter iter; }; -// FUNCTION TEMPLATE inserter template _NODISCARD _CONSTEXPR20 insert_iterator<_Container> inserter(_Container& _Cont, typename _Container::iterator _Where) { return insert_iterator<_Container>(_Cont, _Where); } #ifdef __cpp_lib_concepts -// CLASS TEMPLATE move_sentinel template class move_sentinel { public: @@ -220,7 +213,6 @@ private: }; #endif // __cpp_lib_concepts -// CLASS TEMPLATE istream_iterator template , class _Diff = ptrdiff_t> class istream_iterator { public: @@ -305,7 +297,6 @@ _NODISCARD bool operator!=(const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _ } #endif // !_HAS_CXX20 -// CLASS TEMPLATE ostream_iterator template > class ostream_iterator { public: @@ -351,7 +342,6 @@ private: ostream_type* _Myostr; // pointer to output stream }; -// CLASS TEMPLATE istreambuf_iterator template class istreambuf_iterator { public: @@ -489,7 +479,6 @@ _NODISCARD bool operator!=( } #endif // !_HAS_CXX20 -// CLASS TEMPLATE ostreambuf_iterator template class ostreambuf_iterator { public: @@ -541,7 +530,6 @@ private: }; #ifdef __cpp_lib_concepts -// CLASS TEMPLATE common_iterator enum class _Variantish_state : unsigned char { _Nothing, _Holds_iter, _Holds_sentinel }; struct _Common_iterator_construct_tag { @@ -1039,7 +1027,6 @@ struct iterator_traits> { using reference = iter_reference_t<_Iter>; }; -// CLASS TEMPLATE counted_iterator template struct _Counted_iterator_value_type_base {}; @@ -1372,7 +1359,6 @@ _STDEXT_BEGIN using _STD iterator_traits; using _STD size_t; -// CLASS TEMPLATE checked_array_iterator template class checked_array_iterator { // wrap a pointer with checking static_assert(_STD is_pointer_v<_Ptr>, "checked_array_iterator requires pointers"); @@ -1575,7 +1561,6 @@ _NODISCARD constexpr checked_array_iterator<_Ptr> make_checked_array_iterator( return checked_array_iterator<_Ptr>(_Array, _Size, _Index); } -// CLASS TEMPLATE unchecked_array_iterator template class unchecked_array_iterator { // wrap a pointer without checking, to silence warnings static_assert(_STD is_pointer_v<_Ptr>, "unchecked_array_iterator requires pointers"); diff --git a/stl/inc/limits b/stl/inc/limits index f08f92bf2ac..8e2681fdaab 100644 --- a/stl/inc/limits +++ b/stl/inc/limits @@ -23,14 +23,12 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// ENUM float_denorm_style enum float_denorm_style { // constants for different IEEE float denormalization styles denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; -// ENUM float_round_style enum float_round_style { // constants for different IEEE rounding styles round_indeterminate = -1, round_toward_zero = 0, @@ -39,7 +37,6 @@ enum float_round_style { // constants for different IEEE rounding styles round_toward_neg_infinity = 3 }; -// STRUCT _Num_base struct _Num_base { // base for all types, with common defaults static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; @@ -66,7 +63,6 @@ struct _Num_base { // base for all types, with common defaults static constexpr int radix = 0; }; -// CLASS TEMPLATE numeric_limits template class numeric_limits : public _Num_base { // numeric limits for arbitrary type _Ty (say little or nothing) public: @@ -116,7 +112,6 @@ class numeric_limits : public numeric_limits<_Ty> {}; // numeric l template class numeric_limits : public numeric_limits<_Ty> {}; // numeric limits for const volatile types -// STRUCT _Num_int_base struct _Num_int_base : _Num_base { // base for integer types static constexpr bool is_bounded = true; static constexpr bool is_exact = true; @@ -125,7 +120,6 @@ struct _Num_int_base : _Num_base { // base for integer types static constexpr int radix = 2; }; -// STRUCT _Num_float_base struct _Num_float_base : _Num_base { // base for floating-point types static constexpr float_denorm_style has_denorm = denorm_present; static constexpr bool has_infinity = true; @@ -139,7 +133,6 @@ struct _Num_float_base : _Num_base { // base for floating-point types static constexpr int radix = FLT_RADIX; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -182,7 +175,6 @@ public: static constexpr int digits = 1; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -228,7 +220,6 @@ public: static constexpr int digits10 = 2; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -273,7 +264,6 @@ public: static constexpr int digits10 = 2; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -319,7 +309,6 @@ public: }; #ifdef __cpp_char8_t -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -365,7 +354,6 @@ public: }; #endif // __cpp_char8_t -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -410,7 +398,6 @@ public: static constexpr int digits10 = 4; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -455,7 +442,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -500,7 +486,6 @@ public: static constexpr int digits10 = 4; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -545,7 +530,6 @@ public: static constexpr int digits10 = 4; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -590,7 +574,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -636,7 +619,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -682,7 +664,6 @@ public: }; #ifdef _NATIVE_WCHAR_T_DEFINED -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -728,7 +709,6 @@ public: }; #endif // _NATIVE_WCHAR_T_DEFINED -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -773,7 +753,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -819,7 +798,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -864,7 +842,6 @@ public: static constexpr int digits10 = 19; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_float_base { public: @@ -913,7 +890,6 @@ public: static constexpr int min_exponent10 = FLT_MIN_10_EXP; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_float_base { public: @@ -962,7 +938,6 @@ public: static constexpr int min_exponent10 = DBL_MIN_10_EXP; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_float_base { public: diff --git a/stl/inc/list b/stl/inc/list index b5fcf123193..ddf863fa9b4 100644 --- a/stl/inc/list +++ b/stl/inc/list @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _List_unchecked_const_iterator template class _List_unchecked_const_iterator : public _Base { public: @@ -83,7 +82,6 @@ public: _Nodeptr _Ptr; // pointer to node }; -// CLASS TEMPLATE _List_unchecked_iterator template class _List_unchecked_iterator : public _List_unchecked_const_iterator<_Mylist> { public: @@ -129,7 +127,6 @@ public: } }; -// CLASS TEMPLATE _List_const_iterator template class _List_const_iterator : public _List_unchecked_const_iterator<_Mylist, _Iterator_base> { public: @@ -224,7 +221,6 @@ public: } }; -// CLASS TEMPLATE _List_iterator template class _List_iterator : public _List_const_iterator<_Mylist> { public: @@ -341,7 +337,6 @@ struct _List_simple_types : _Simple_types<_Ty> { using _Nodeptr = _Node*; }; -// CLASS TEMPLATE _List_val template class _List_val : public _Container_base { public: @@ -579,7 +574,6 @@ public: size_type _Mysize; // number of elements }; -// STRUCT TEMPLATE _List_node_emplace_op2 template struct _List_node_emplace_op2 : _Alloc_construct_ptr<_Alnode> { using _Alnode_traits = allocator_traits<_Alnode>; @@ -612,7 +606,6 @@ struct _List_node_emplace_op2 : _Alloc_construct_ptr<_Alnode> { } }; -// STRUCT TEMPLATE _List_node_insert_op2 template struct _List_node_insert_op2 { // list insert operation which maintains exception safety @@ -758,7 +751,6 @@ private: template class _Hash; -// CLASS TEMPLATE list template > class list { // bidirectional linked list private: diff --git a/stl/inc/locale b/stl/inc/locale index fb99b74393d..838362667da 100644 --- a/stl/inc/locale +++ b/stl/inc/locale @@ -23,7 +23,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE collate template class collate : public locale::facet { // facet for ordering sequences of elements public: @@ -143,7 +142,6 @@ template __PURE_APPDOMAIN_GLOBAL locale::id collate::id; #pragma clang diagnostic pop #endif // __clang__ -// CLASS TEMPLATE collate_byname template class collate_byname : public collate<_Elem> { // collate for named locale public: @@ -159,7 +157,6 @@ protected: virtual __CLR_OR_THIS_CALL ~collate_byname() noexcept {} }; -// FUNCTION TEMPLATE has_facet template _NODISCARD bool has_facet(const locale& _Loc) noexcept { _BEGIN_LOCK(_LOCK_LOCALE) // the thread lock, make get atomic @@ -168,85 +165,71 @@ _NODISCARD bool has_facet(const locale& _Loc) noexcept { _END_LOCK() } -// FUNCTION TEMPLATE isalnum template _NODISCARD bool(isalnum)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::alnum, _Ch); } -// FUNCTION TEMPLATE isalpha template _NODISCARD bool(isalpha)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::alpha, _Ch); } -// FUNCTION TEMPLATE isblank template _NODISCARD bool(isblank)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::blank, _Ch); } -// FUNCTION TEMPLATE iscntrl template _NODISCARD bool(iscntrl)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::cntrl, _Ch); } -// FUNCTION TEMPLATE isdigit template _NODISCARD bool(isdigit)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::digit, _Ch); } -// FUNCTION TEMPLATE isgraph template _NODISCARD bool(isgraph)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::graph, _Ch); } -// FUNCTION TEMPLATE islower template _NODISCARD bool(islower)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::lower, _Ch); } -// FUNCTION TEMPLATE isprint template _NODISCARD bool(isprint)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::print, _Ch); } -// FUNCTION TEMPLATE ispunct template _NODISCARD bool(ispunct)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::punct, _Ch); } -// FUNCTION TEMPLATE isspace template _NODISCARD bool(isspace)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::space, _Ch); } -// FUNCTION TEMPLATE isupper template _NODISCARD bool(isupper)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::upper, _Ch); } -// FUNCTION TEMPLATE isxdigit template _NODISCARD bool(isxdigit)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).is(ctype_base::xdigit, _Ch); } -// FUNCTION TEMPLATE tolower template _NODISCARD _Elem(tolower)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).tolower(_Ch); } -// FUNCTION TEMPLATE toupper template _NODISCARD _Elem(toupper)(_Elem _Ch, const locale& _Loc) { return _STD use_facet>(_Loc).toupper(_Ch); diff --git a/stl/inc/map b/stl/inc/map index 1c66bbcd478..66fdd9fc81d 100644 --- a/stl/inc/map +++ b/stl/inc/map @@ -23,7 +23,6 @@ _STL_DISABLE_CLANG_WARNINGS #pragma push_macro("new") #undef new _STD_BEGIN -// CLASS TEMPLATE _Tmap_traits template , class _Alloc = allocator>> class map : public _Tree<_Tmap_traits<_Kty, _Ty, _Pr, _Alloc, false>> { // ordered red-black tree of {key, mapped} values, unique keys @@ -419,7 +417,6 @@ typename map<_Kty, _Ty, _Keylt, _Alloc>::size_type erase_if(map<_Kty, _Ty, _Keyl } #endif // _HAS_CXX20 -// CLASS TEMPLATE multimap template , class _Alloc = allocator>> class multimap : public _Tree<_Tmap_traits<_Kty, _Ty, _Pr, _Alloc, true>> { // ordered red-black tree of {key, mapped} values, non-unique keys diff --git a/stl/inc/memory b/stl/inc/memory index 9cc17c13117..08999215d16 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -32,7 +32,6 @@ namespace ranges { template using uninitialized_copy_result = in_out_result<_In, _Out>; - // VARIABLE ranges::uninitialized_copy class _Uninitialized_copy_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -108,7 +107,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE uninitialized_copy_n template _NoThrowFwdIt uninitialized_copy_n(const _InIt _First, const _Diff _Count_raw, _NoThrowFwdIt _Dest) { // copy [_First, _First + _Count) to [_Dest, ...) @@ -141,7 +139,6 @@ namespace ranges { template using uninitialized_copy_n_result = in_out_result<_In, _Out>; - // VARIABLE ranges::uninitialized_copy_n class _Uninitialized_copy_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -192,7 +189,6 @@ namespace ranges { #endif // __cpp_lib_concepts #if _HAS_CXX17 -// FUNCTION TEMPLATE uninitialized_move template _NoThrowFwdIt uninitialized_move(const _InIt _First, const _InIt _Last, _NoThrowFwdIt _Dest) { // move [_First, _Last) to raw [_Dest, ...) @@ -206,7 +202,6 @@ _NoThrowFwdIt uninitialized_move(const _InIt _First, const _InIt _Last, _NoThrow #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::uninitialized_move class _Uninitialized_move_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -247,7 +242,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE uninitialized_move_n template pair<_InIt, _NoThrowFwdIt> uninitialized_move_n(_InIt _First, const _Diff _Count_raw, _NoThrowFwdIt _Dest) { // move [_First, _First + _Count) to [_Dest, ...) @@ -284,7 +278,6 @@ namespace ranges { template using uninitialized_move_n_result = in_out_result<_In, _Out>; - // VARIABLE ranges::uninitialized_move_n class _Uninitialized_move_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -332,7 +325,6 @@ namespace ranges { inline constexpr _Uninitialized_move_n_fn uninitialized_move_n{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::uninitialized_fill class _Uninitialized_fill_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -393,7 +385,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE uninitialized_fill_n template _NoThrowFwdIt uninitialized_fill_n(_NoThrowFwdIt _First, const _Diff _Count_raw, const _Tval& _Val) { // copy _Count copies of _Val to raw _First @@ -430,7 +421,6 @@ _NoThrowFwdIt uninitialized_fill_n(_NoThrowFwdIt _First, const _Diff _Count_raw, #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::uninitialized_fill_n class _Uninitialized_fill_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -471,7 +461,6 @@ namespace ranges { inline constexpr _Uninitialized_fill_n_fn uninitialized_fill_n{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::construct_at class _Construct_at_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -492,7 +481,6 @@ namespace ranges { inline constexpr _Construct_at_fn construct_at{_Not_quite_object::_Construct_tag{}}; - // VARIABLE ranges::destroy_at // clang-format off template <_No_throw_input_iterator _It, _No_throw_sentinel_for<_It> _Se> requires destructible> @@ -518,7 +506,6 @@ namespace ranges { #endif // __cpp_lib_concepts #if _HAS_CXX17 -// FUNCTION TEMPLATE destroy template _CONSTEXPR20 void destroy(const _NoThrowFwdIt _First, const _NoThrowFwdIt _Last) { // destroy all elements in [_First, _Last) @@ -528,7 +515,6 @@ _CONSTEXPR20 void destroy(const _NoThrowFwdIt _First, const _NoThrowFwdIt _Last) #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::destroy // clang-format off template <_No_throw_input_iterator _It, _No_throw_sentinel_for<_It> _Se> requires destructible> @@ -575,7 +561,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE destroy_n template _CONSTEXPR20 _NoThrowFwdIt destroy_n(_NoThrowFwdIt _First, const _Diff _Count_raw) { // destroy all elements in [_First, _First + _Count) @@ -599,7 +584,6 @@ _CONSTEXPR20 _NoThrowFwdIt destroy_n(_NoThrowFwdIt _First, const _Diff _Count_ra #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::destroy_n class _Destroy_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -634,7 +618,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE uninitialized_default_construct template void uninitialized_default_construct(const _NoThrowFwdIt _First, const _NoThrowFwdIt _Last) { // default-initialize all elements in [_First, _Last) @@ -653,7 +636,6 @@ void uninitialized_default_construct(const _NoThrowFwdIt _First, const _NoThrowF #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::uninitialized_default_construct class _Uninitialized_default_construct_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -709,7 +691,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE uninitialized_default_construct_n template _NoThrowFwdIt uninitialized_default_construct_n(_NoThrowFwdIt _First, const _Diff _Count_raw) { // default-initialize all elements in [_First, _First + _Count_raw) @@ -735,7 +716,6 @@ _NoThrowFwdIt uninitialized_default_construct_n(_NoThrowFwdIt _First, const _Dif #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::uninitialized_default_construct_n class _Uninitialized_default_construct_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -770,7 +750,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE uninitialized_value_construct template void uninitialized_value_construct(const _NoThrowFwdIt _First, const _NoThrowFwdIt _Last) { // value-initialize all elements in [_First, _Last) @@ -792,7 +771,6 @@ void uninitialized_value_construct(const _NoThrowFwdIt _First, const _NoThrowFwd #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::uninitialized_value_construct class _Uninitialized_value_construct_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -846,7 +824,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE uninitialized_value_construct_n template _NoThrowFwdIt uninitialized_value_construct_n(_NoThrowFwdIt _First, const _Diff _Count_raw) { // value-initialize all elements in [_First, _First + _Count_raw) @@ -861,7 +838,6 @@ _NoThrowFwdIt uninitialized_value_construct_n(_NoThrowFwdIt _First, const _Diff #ifdef __cpp_lib_concepts namespace ranges { - // VARIABLE ranges::uninitialized_value_construct_n class _Uninitialized_value_construct_n_fn : private _Not_quite_object { public: using _Not_quite_object::_Not_quite_object; @@ -899,7 +875,6 @@ namespace ranges { #if _HAS_DEPRECATED_RAW_STORAGE_ITERATOR -// CLASS TEMPLATE raw_storage_iterator template class _CXX17_DEPRECATE_RAW_STORAGE_ITERATOR raw_storage_iterator { // wrap stores to raw buffer as output iterator public: @@ -947,7 +922,6 @@ private: #if _HAS_AUTO_PTR_ETC -// CLASS TEMPLATE auto_ptr template class auto_ptr; @@ -1057,7 +1031,6 @@ public: #endif // _HAS_AUTO_PTR_ETC -// CLASS bad_weak_ptr class bad_weak_ptr : public exception { // exception type for invalid use of expired weak_ptr object public: bad_weak_ptr() noexcept {} @@ -1072,7 +1045,6 @@ public: _THROW(bad_weak_ptr{}); } -// CLASS _Ref_count_base class __declspec(novtable) _Ref_count_base { // common code for reference counting private: #ifdef _M_CEE_PURE @@ -1150,7 +1122,6 @@ public: } }; -// CLASS TEMPLATE _Ref_count template class _Ref_count : public _Ref_count_base { // handle reference counting for pointer without deleter public: @@ -1168,7 +1139,6 @@ private: _Ty* _Ptr; }; -// CLASS TEMPLATE _Ref_count_resource template class _Ref_count_resource : public _Ref_count_base { // handle reference counting for object with deleter public: @@ -1205,7 +1175,6 @@ private: _Compressed_pair<_Dx, _Resource> _Mypair; }; -// CLASS TEMPLATE _Ref_count_resource_alloc template class _Ref_count_resource_alloc : public _Ref_count_base { // handle reference counting for object with deleter and allocator @@ -1270,7 +1239,6 @@ struct _Can_enable_shared<_Yty, void_t> // is_convertible is necessary to verify unambiguous inheritance }; -// CLASS TEMPLATE _Ptr_base struct _Exception_ptr_access; template @@ -1495,7 +1463,6 @@ struct _SP_pointer_compatible<_Uty[_Ext], const volatile _Uty[]> : true_type { // N4659 [util.smartptr.shared]/5 "... or Y is U[N] and T is cv U[]." }; -// CLASS TEMPLATE shared_ptr template struct _Temporary_owner { _Ux* _Ptr; @@ -2038,7 +2005,6 @@ struct _For_overwrite_tag { }; #endif // _HAS_CXX20 -// CLASS TEMPLATE _Ref_count_obj2 template class _Ref_count_obj2 : public _Ref_count_base { // handle reference counting for object in control block, no allocator public: @@ -2288,7 +2254,6 @@ void _Uninitialized_fill_multidimensional_n(_Ty* const _Out, const size_t _Size, } } -// CLASS TEMPLATE _Ref_count_unbounded_array template >> class _Ref_count_unbounded_array : public _Ref_count_base { // handle reference counting for unbounded array with trivial destruction in control block, no allocator @@ -2383,7 +2348,6 @@ private: } }; -// CLASS TEMPLATE _Ref_count_bounded_array template class _Ref_count_bounded_array : public _Ref_count_base { // handle reference counting for bounded array in control block, no allocator @@ -2422,7 +2386,6 @@ private: }; #endif // _HAS_CXX20 -// CLASS TEMPLATE _Ebco_base template && !is_final_v<_Ty>> class _Ebco_base : private _Ty { // Empty Base Class Optimization, active @@ -2462,7 +2425,6 @@ protected: } }; -// CLASS TEMPLATE _Ref_count_obj_alloc3 template class _Ref_count_obj_alloc3 : public _Ebco_base<_Rebind_alloc_t<_Alloc, _Ty>>, public _Ref_count_base { // handle reference counting for object in control block, allocator @@ -2639,7 +2601,6 @@ void _Uninitialized_fill_multidimensional_n_al(_Ty* const _Out, const size_t _Si } } -// CLASS TEMPLATE _Ref_count_unbounded_array_alloc template class _Ref_count_unbounded_array_alloc : public _Ebco_base<_Rebind_alloc_t<_Alloc, remove_all_extents_t<_Ty>>>, public _Ref_count_base { @@ -2707,7 +2668,6 @@ private: } }; -// CLASS TEMPLATE _Ref_count_bounded_array_alloc template class _Ref_count_bounded_array_alloc : public _Ebco_base<_Rebind_alloc_t<_Alloc, remove_all_extents_t<_Ty>>>, public _Ref_count_base { @@ -2761,7 +2721,6 @@ private: }; #endif // _HAS_CXX20 -// FUNCTION TEMPLATE make_shared template _NODISCARD #if _HAS_CXX20 @@ -2834,7 +2793,6 @@ _NODISCARD enable_if_t, shared_ptr<_Ty>> make_shared(con return _Ret; } -// FUNCTION TEMPLATE make_shared_for_overwrite template _NODISCARD enable_if_t, shared_ptr<_Ty>> make_shared_for_overwrite() { shared_ptr<_Ty> _Ret; @@ -2856,7 +2814,6 @@ _NODISCARD enable_if_t, shared_ptr<_Ty>> make_shared_f } #endif // _HAS_CXX20 -// FUNCTION TEMPLATE allocate_shared template _NODISCARD #if _HAS_CXX20 @@ -2961,7 +2918,6 @@ _NODISCARD enable_if_t, shared_ptr<_Ty>> allocate_shared return _Ret; } -// FUNCTION TEMPLATE allocate_shared_for_overwrite template _NODISCARD enable_if_t, shared_ptr<_Ty>> allocate_shared_for_overwrite(const _Alloc& _Al) { shared_ptr<_Ty> _Ret; @@ -2997,7 +2953,6 @@ _NODISCARD enable_if_t, shared_ptr<_Ty>> allocate_shar } #endif // _HAS_CXX20 -// CLASS TEMPLATE weak_ptr template class weak_ptr : public _Ptr_base<_Ty> { // class for pointer to reference counted resource public: @@ -3087,7 +3042,6 @@ void swap(weak_ptr<_Ty>& _Left, weak_ptr<_Ty>& _Right) noexcept { _Left.swap(_Right); } -// CLASS TEMPLATE enable_shared_from_this template class enable_shared_from_this { // provide member functions that create shared_ptr to this public: @@ -3130,9 +3084,6 @@ private: }; -// CLASS TEMPLATE unique_ptr AND HELPERS - -// STRUCT TEMPLATE default_delete template struct default_delete { // default deleter for unique_ptr constexpr default_delete() noexcept = default; @@ -3160,7 +3111,6 @@ struct default_delete<_Ty[]> { // default deleter for unique_ptr to array of unk } }; -// STRUCT TEMPLATE _Get_deleter_pointer_type template struct _Get_deleter_pointer_type { // provide fallback using type = _Ty*; @@ -3175,7 +3125,6 @@ template using _Unique_ptr_enable_default_t = enable_if_t>, is_default_constructible<_Dx2>>, int>; -// CLASS TEMPLATE unique_ptr SCALAR template */> class unique_ptr { // non-copyable pointer to an object public: @@ -3301,7 +3250,6 @@ private: _Compressed_pair<_Dx, pointer> _Mypair; }; -// CLASS TEMPLATE unique_ptr ARRAY template class unique_ptr<_Ty[], _Dx> { // non-copyable pointer to an array object public: @@ -3435,7 +3383,6 @@ private: }; -// FUNCTION TEMPLATE make_unique template , int> = 0> _NODISCARD unique_ptr<_Ty> make_unique(_Types&&... _Args) { // make a unique_ptr return unique_ptr<_Ty>(new _Ty(_STD forward<_Types>(_Args)...)); @@ -3451,7 +3398,6 @@ template != 0, int> = 0> void make_unique(_Types&&...) = delete; #if _HAS_CXX20 -// FUNCTION TEMPLATE make_unique_for_overwrite template , int> = 0> _NODISCARD unique_ptr<_Ty> make_unique_for_overwrite() { // make a unique_ptr with default initialization return unique_ptr<_Ty>(new _Ty); @@ -3630,7 +3576,6 @@ inline pointer_safety get_pointer_safety() noexcept { } #endif // _HAS_GARBAGE_COLLECTION_SUPPORT_DELETED_IN_CXX23 -// STRUCT TEMPLATE owner_less template struct owner_less; // not defined @@ -3697,7 +3642,6 @@ struct owner_less { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION hash template struct hash> : _Conditionally_enabled_hash, is_default_constructible_v::pointer>>> { @@ -3717,7 +3661,6 @@ struct hash> { } }; -// FUNCTION align inline void* align(size_t _Bound, size_t _Size, void*& _Ptr, size_t& _Space) noexcept /* strengthened */ { // try to carve out _Size bytes on boundary _Bound size_t _Off = static_cast(reinterpret_cast(_Ptr) & (_Bound - 1)); diff --git a/stl/inc/memory_resource b/stl/inc/memory_resource index 386122fabb9..c9648cf8c7a 100644 --- a/stl/inc/memory_resource +++ b/stl/inc/memory_resource @@ -32,7 +32,6 @@ _STD_BEGIN namespace pmr { - // FUNCTION set_default_resource extern "C" _CRT_SATELLITE_1 memory_resource* __cdecl _Aligned_set_default_resource(memory_resource*) noexcept; extern "C" _CRT_SATELLITE_1 memory_resource* __cdecl _Unaligned_set_default_resource(memory_resource*) noexcept; @@ -46,7 +45,6 @@ namespace pmr { extern "C" _NODISCARD _CRT_SATELLITE_1 memory_resource* __cdecl null_memory_resource() noexcept; - // FUNCTION new_delete_resource class _Identity_equal_resource : public memory_resource { protected: virtual bool do_is_equal(const memory_resource& _That) const noexcept override { @@ -105,7 +103,6 @@ namespace pmr { } #endif // __cpp_aligned_new - // CLASS unsynchronized_pool_resource template struct _Double_link { // base class for intrusive doubly-linked structures _Double_link* _Next; @@ -597,7 +594,6 @@ namespace pmr { }; #endif // _M_CEE - // CLASS TEMPLATE monotonic_buffer_resource class monotonic_buffer_resource : public _Identity_equal_resource { public: explicit monotonic_buffer_resource(memory_resource* const _Upstream) noexcept // strengthened diff --git a/stl/inc/mutex b/stl/inc/mutex index aafefe48bcd..16fdf16b81a 100644 --- a/stl/inc/mutex +++ b/stl/inc/mutex @@ -123,13 +123,11 @@ _INLINE_VAR constexpr adopt_lock_t adopt_lock{}; _INLINE_VAR constexpr defer_lock_t defer_lock{}; _INLINE_VAR constexpr try_to_lock_t try_to_lock{}; -// CLASS TEMPLATE unique_lock template class unique_lock { // whizzy class with destructor that unlocks mutex public: using mutex_type = _Mutex; - // CONSTRUCT, ASSIGN, AND DESTROY unique_lock() noexcept : _Pmtx(nullptr), _Owns(false) {} _NODISCARD_CTOR explicit unique_lock(_Mutex& _Mtx) @@ -276,20 +274,17 @@ private: } }; -// FUNCTION TEMPLATE swap FOR unique_lock template void swap(unique_lock<_Mutex>& _Left, unique_lock<_Mutex>& _Right) noexcept { _Left.swap(_Right); } -// FUNCTION TEMPLATE _Lock_from_locks template void _Lock_from_locks(const int _Target, index_sequence<_Indices...>, _LockN&... _LkN) { // lock _LkN[_Target] int _Ignored[] = {((static_cast(_Indices) == _Target ? (void) _LkN.lock() : void()), 0)...}; (void) _Ignored; } -// FUNCTION TEMPLATE _Try_lock_from_locks template bool _Try_lock_from_locks( const int _Target, index_sequence<_Indices...>, _LockN&... _LkN) { // try to lock _LkN[_Target] @@ -299,7 +294,6 @@ bool _Try_lock_from_locks( return _Result; } -// FUNCTION TEMPLATE _Unlock_locks template void _Unlock_locks(const int _First, const int _Last, index_sequence<_Indices...>, _LockN&... _LkN) noexcept /* terminates */ { @@ -310,7 +304,6 @@ void _Unlock_locks(const int _First, const int _Last, index_sequence<_Indices... (void) _Ignored; } -// FUNCTION TEMPLATE try_lock template int _Try_lock_range(const int _First, const int _Last, _LockN&... _LkN) { using _Indices = index_sequence_for<_LockN...>; @@ -360,7 +353,6 @@ _NODISCARD int try_lock(_Lock0& _Lk0, _Lock1& _Lk1, _LockN&... _LkN) { // try to return _Try_lock1(_Lk0, _Lk1, _LkN...); } -// FUNCTION TEMPLATE lock template int _Lock_attempt(const int _Hard_lock, _LockN&... _LkN) { // attempt to lock 3 or more locks, starting by locking _LkN[_Hard_lock] and trying to lock the rest @@ -428,7 +420,6 @@ void lock(_Lock0& _Lk0, _Lock1& _Lk1, _LockN&... _LkN) { // lock multiple locks, _Lock_nonmember1(_Lk0, _Lk1, _LkN...); } -// CLASS TEMPLATE lock_guard template class _NODISCARD lock_guard { // class with destructor that unlocks a mutex public: @@ -452,7 +443,6 @@ private: }; #if _HAS_CXX17 -// CLASS TEMPLATE scoped_lock template class _NODISCARD scoped_lock { // class with destructor that unlocks mutexes public: @@ -507,7 +497,6 @@ public: }; #endif // _HAS_CXX17 -// FUNCTION TEMPLATE call_once #ifdef _M_CEE #define _WINDOWS_API __stdcall #define _RENAME_WINDOWS_API(_Api) _Api##_clr diff --git a/stl/inc/new b/stl/inc/new index c0f88c82b7e..4d6b0ca1f22 100644 --- a/stl/inc/new +++ b/stl/inc/new @@ -20,7 +20,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN #if _HAS_CXX20 -// STRUCT destroying_delete_t struct destroying_delete_t { explicit destroying_delete_t() = default; }; @@ -28,7 +27,6 @@ inline constexpr destroying_delete_t destroying_delete{}; #endif // _HAS_CXX20 #if _HAS_CXX17 -// FUNCTION TEMPLATE launder template _NODISCARD constexpr _Ty* launder(_Ty* _Ptr) noexcept { static_assert(!is_function_v<_Ty> && !is_void_v<_Ty>, @@ -51,7 +49,6 @@ inline constexpr size_t hardware_destructive_interference_size = 64; using new_handler = void(__CLRCALL_PURE_OR_CDECL*)(); #endif // !defined(_INC_NEW) || !defined(_MSC_EXTENSIONS) -// FUNCTION AND OBJECT DECLARATIONS _CRTIMP2 new_handler __cdecl set_new_handler(_In_opt_ new_handler) noexcept; _NODISCARD _CRTIMP2 new_handler __cdecl get_new_handler() noexcept; _STD_END diff --git a/stl/inc/numeric b/stl/inc/numeric index b8c4f86ae8d..1d6c90bf094 100644 --- a/stl/inc/numeric +++ b/stl/inc/numeric @@ -21,7 +21,6 @@ _STL_DISABLE_CLANG_WARNINGS #pragma push_macro("new") #undef new _STD_BEGIN -// FUNCTION TEMPLATE accumulate template _NODISCARD _CONSTEXPR20 _Ty accumulate(const _InIt _First, const _InIt _Last, _Ty _Val, _Fn _Reduce_op) { // return noncommutative and nonassociative reduction of _Val and all in [_First, _Last), using _Reduce_op @@ -45,7 +44,6 @@ _NODISCARD _CONSTEXPR20 _Ty accumulate(const _InIt _First, const _InIt _Last, _T } #if _HAS_CXX17 -// FUNCTION TEMPLATE reduce #if _STD_VECTORIZE_WITH_FLOAT_CONTROL template inline constexpr bool _Plus_on_arithmetic_ranges_reduction_v = @@ -124,7 +122,6 @@ _NODISCARD _Iter_value_t<_FwdIt> reduce(_ExPo&& _Exec, const _FwdIt _First, cons } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE inner_product template _NODISCARD _CONSTEXPR20 _Ty inner_product( _InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _Ty _Val, _BinOp1 _Reduce_op, _BinOp2 _Transform_op) { @@ -152,7 +149,6 @@ _NODISCARD _CONSTEXPR20 _Ty inner_product(const _InIt1 _First1, const _InIt1 _La } #if _HAS_CXX17 -// FUNCTION TEMPLATE transform_reduce #if _STD_VECTORIZE_WITH_FLOAT_CONTROL template inline constexpr bool _Default_ops_transform_reduce_v = @@ -243,7 +239,6 @@ _NODISCARD _Ty transform_reduce(_ExPo&& _Exec, const _FwdIt _First1, const _FwdI _UnaryOp _Transform_op) noexcept; // terminates #endif // _HAS_CXX17 -// FUNCTION TEMPLATE partial_sum template _CONSTEXPR20 _OutIt partial_sum(const _InIt _First, const _InIt _Last, _OutIt _Dest, _BinOp _Reduce_op) { // compute partial noncommutative and nonassociative reductions into _Dest, using _Reduce_op @@ -280,7 +275,6 @@ _CONSTEXPR20 _OutIt partial_sum(_InIt _First, _InIt _Last, _OutIt _Dest) { } #if _HAS_CXX17 -// FUNCTION TEMPLATE exclusive_scan template _CONSTEXPR20 _OutIt exclusive_scan(const _InIt _First, const _InIt _Last, _OutIt _Dest, _Ty _Val, _BinOp _Reduce_op) { // set each value in [_Dest, _Dest + (_Last - _First)) to the associative reduction of predecessors and _Val @@ -323,7 +317,6 @@ _FwdIt2 exclusive_scan(_ExPo&& _Exec, const _FwdIt1 _First, const _FwdIt1 _Last, return _STD exclusive_scan(_STD forward<_ExPo>(_Exec), _First, _Last, _Dest, _STD move(_Val), plus{}); } -// FUNCTION TEMPLATE inclusive_scan template _CONSTEXPR20 _OutIt inclusive_scan(const _InIt _First, const _InIt _Last, _OutIt _Dest, _BinOp _Reduce_op, _Ty _Val) { // compute partial noncommutative and associative reductions including _Val into _Dest, using _Reduce_op @@ -387,7 +380,6 @@ _FwdIt2 inclusive_scan(_ExPo&& _Exec, const _FwdIt1 _First, const _FwdIt1 _Last, return _STD inclusive_scan(_STD forward<_ExPo>(_Exec), _First, _Last, _Dest, plus{}); } -// FUNCTION TEMPLATE transform_exclusive_scan template _CONSTEXPR20 _OutIt transform_exclusive_scan( const _InIt _First, const _InIt _Last, _OutIt _Dest, _Ty _Val, _BinOp _Reduce_op, _UnaryOp _Transform_op) { @@ -419,7 +411,6 @@ template _CONSTEXPR20 _OutIt transform_inclusive_scan( const _InIt _First, const _InIt _Last, _OutIt _Dest, _BinOp _Reduce_op, _UnaryOp _Transform_op, _Ty _Val) { @@ -475,7 +466,6 @@ _FwdIt2 transform_inclusive_scan(_ExPo&& _Exec, const _FwdIt1 _First, const _Fwd _BinOp _Reduce_op, _UnaryOp _Transform_op) noexcept; // terminates #endif // _HAS_CXX17 -// FUNCTION TEMPLATE adjacent_difference template _CONSTEXPR20 _OutIt adjacent_difference(const _InIt _First, const _InIt _Last, _OutIt _Dest, _BinOp _Func) { // compute adjacent differences into _Dest @@ -522,7 +512,6 @@ _FwdIt2 adjacent_difference(_ExPo&& _Exec, const _FwdIt1 _First, const _FwdIt1 _ } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE iota template _CONSTEXPR20 void iota(_FwdIt _First, _FwdIt _Last, _Ty _Val) { // compute increasing sequence into [_First, _Last) @@ -535,7 +524,6 @@ _CONSTEXPR20 void iota(_FwdIt _First, _FwdIt _Last, _Ty _Val) { } #if _HAS_CXX17 -// FUNCTION TEMPLATE _Abs_u template _NODISCARD constexpr auto _Abs_u(const _Integral _Val) noexcept { // computes absolute value of _Val (converting to an unsigned integer type if necessary to avoid overflow @@ -555,7 +543,6 @@ _NODISCARD constexpr auto _Abs_u(const _Integral _Val) noexcept { } } -// FUNCTION TEMPLATE gcd template _NODISCARD constexpr common_type_t<_Mt, _Nt> gcd(const _Mt _Mx, const _Nt _Nx) noexcept /* strengthened */ { // calculate greatest common divisor @@ -592,7 +579,6 @@ _NODISCARD constexpr common_type_t<_Mt, _Nt> gcd(const _Mt _Mx, const _Nt _Nx) n return static_cast<_Common>(_Mx_magnitude << _Common_factors_of_2); } -// FUNCTION TEMPLATE lcm template _NODISCARD constexpr common_type_t<_Mt, _Nt> lcm(const _Mt _Mx, const _Nt _Nx) noexcept /* strengthened */ { // calculate least common multiple @@ -610,7 +596,6 @@ _NODISCARD constexpr common_type_t<_Mt, _Nt> lcm(const _Mt _Mx, const _Nt _Nx) n #endif // _HAS_CXX17 #if _HAS_CXX20 -// FUNCTION TEMPLATE midpoint template && !is_same_v, bool>, int> = 0> _NODISCARD constexpr _Ty midpoint(const _Ty _Val1, const _Ty _Val2) noexcept { if constexpr (is_floating_point_v<_Ty>) { diff --git a/stl/inc/optional b/stl/inc/optional index e007eb5d3fc..4da38c0e43d 100644 --- a/stl/inc/optional +++ b/stl/inc/optional @@ -30,14 +30,12 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN -// STRUCT nullopt_t [optional.nullopt] struct nullopt_t { // no-value state indicator struct _Tag {}; constexpr explicit nullopt_t(_Tag) {} }; inline constexpr nullopt_t nullopt{nullopt_t::_Tag{}}; -// CLASS bad_optional_access [optional.bad_optional_access] class bad_optional_access : public exception { public: _NODISCARD virtual const char* __CLR_OR_THIS_CALL what() const noexcept override { @@ -152,7 +150,6 @@ struct _Optional_construct_base : _Optional_destruct_base<_Ty> { } }; -// CLASS TEMPLATE optional [optional.object] template class optional : private _SMF_control<_Optional_construct_base<_Ty>, _Ty> { private: @@ -657,13 +654,11 @@ _NODISCARD constexpr compare_three_way_result_t<_Ty1, _Ty2> } #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE swap [optional.specalg] template && is_swappable_v<_Ty>, int> = 0> void swap(optional<_Ty>& _Left, optional<_Ty>& _Right) noexcept(noexcept(_Left.swap(_Right))) { _Left.swap(_Right); } -// FUNCTION TEMPLATE make_optional [optional.specalg] template _NODISCARD constexpr optional> make_optional(_Ty&& _Value) { return optional>{_STD forward<_Ty>(_Value)}; @@ -677,7 +672,6 @@ _NODISCARD constexpr optional<_Ty> make_optional(initializer_list<_Elem> _Ilist, return optional<_Ty>{in_place, _Ilist, _STD forward<_Types>(_Args)...}; } -// STRUCT TEMPLATE SPECIALIZATION hash [optional.hash] template struct hash> : _Conditionally_enabled_hash, is_default_constructible_v>>> { diff --git a/stl/inc/ostream b/stl/inc/ostream index 61766bf311e..19cb7aabd5e 100644 --- a/stl/inc/ostream +++ b/stl/inc/ostream @@ -20,7 +20,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN #pragma vtordisp(push, 2) // compiler bug workaround -// CLASS TEMPLATE basic_ostream template class basic_ostream : virtual public basic_ios<_Elem, _Traits> { // control insertions into a stream buffer public: diff --git a/stl/inc/queue b/stl/inc/queue index edf4c79772a..787587336e5 100644 --- a/stl/inc/queue +++ b/stl/inc/queue @@ -20,7 +20,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE queue template > class queue { public: @@ -173,7 +172,6 @@ void swap(queue<_Ty, _Container>& _Left, queue<_Ty, _Container>& _Right) noexcep template struct uses_allocator, _Alloc> : uses_allocator<_Container, _Alloc>::type {}; -// CLASS TEMPLATE priority_queue template , class _Pr = less> class priority_queue { public: diff --git a/stl/inc/random b/stl/inc/random index 350d5ff6df8..344fc32fde3 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -148,7 +148,6 @@ private: basic_istream<_Elem, _Traits>& _Str; }; -// CLASS seed_seq class seed_seq { // standard sequence of seed values public: using result_type = unsigned int; @@ -244,7 +243,6 @@ private: vector _Myvec; }; -// FUNCTION TEMPLATE generate_canonical template _NODISCARD _Real generate_canonical(_Gen& _Gx) { // build a floating-point value from random sequence _RNG_REQUIRE_REALTYPE(generate_canonical, _Real); @@ -272,7 +270,6 @@ _NODISCARD _Real generate_canonical(_Gen& _Gx) { // build a floating-point value #define _NRAND(eng, resty) (_STD generate_canonical(-1)>(eng)) -// CLASS TEMPLATE linear_congruential_engine _INLINE_VAR constexpr int _MP_len = 5; using _MP_arr = uint64_t[_MP_len]; @@ -462,7 +459,6 @@ private: result_type _Prev; }; -// CLASS TEMPLATE linear_congruential template class linear_congruential { // linear congruential random engine public: @@ -555,7 +551,6 @@ private: _Uint _Prev; }; -// CLASS TEMPLATE _Circ_buf FOR subtract_with_carry, subtract_with_carry_01, AND mersenne_twister template struct _Circ_buf { // holds historical values for generators _Ty _At(size_t _Ix) const { @@ -612,7 +607,6 @@ struct _Circ_buf { // holds historical values for generators _Ty _Ax[2 * _Nw]; }; -// CLASS TEMPLATE _Swc_base (subtract_with_carry, subtract_with_carry_01) template class _Swc_base : public _Circ_buf<_Ty, _Rx> { // common bits of subtract_with_carry/_01 public: @@ -761,7 +755,6 @@ const size_t _Swc_base<_Ty, _Sx, _Rx, _Swc_Traits>::short_lag; template const size_t _Swc_base<_Ty, _Sx, _Rx, _Swc_Traits>::long_lag; -// STRUCT TEMPLATE _Swc_traits template struct _Swc_traits { // traits for subtract_with_carry generator using _Cy_t = int; @@ -838,7 +831,6 @@ struct _Swc_traits { // traits for subtract_with_carry generator } }; -// CLASS TEMPLATE subtract_with_carry template class subtract_with_carry : public _Swc_base<_Ty, _Sx, _Rx, _Swc_traits<_Ty, _Mx, _Rx>> { // subtract_with_carry generator @@ -857,7 +849,6 @@ public: subtract_with_carry(_Gen& _Gx) : _Mybase(_Gx) {} }; -// CLASS TEMPLATE subtract_with_carry_engine template class subtract_with_carry_engine : public subtract_with_carry<_Ty, (_Ty{1} << (_Wx - 1)) << 1, _Sx, _Rx> { // subtract_with_carry generator @@ -925,7 +916,6 @@ public: }; #if _HAS_TR1_NAMESPACE -// STRUCT TEMPLATE _Swc_01_traits template struct _Swc_01_traits { // traits for subtract_with_carry_01 generator using _Cy_t = _Ty; @@ -997,7 +987,6 @@ const _Ty _Swc_01_traits<_Ty, _Wx, _Rx>::_Max = 1; template const _Ty _Swc_01_traits<_Ty, _Wx, _Rx>::_Scale1 = static_cast<_Ty>(_CSTD ldexp(1.0, _Wx % 32)); -// CLASS TEMPLATE subtract_with_carry_01 template class _DEPRECATE_TR1_NAMESPACE subtract_with_carry_01 : public _Swc_base<_Ty, _Sx, _Rx, _Swc_01_traits<_Ty, _Wx, _Rx>> { // subtract_with_carry_01 generator @@ -1021,7 +1010,6 @@ _STL_RESTORE_DEPRECATED_WARNING #endif // _HAS_TR1_NAMESPACE -// CLASS TEMPLATE mersenne_twister template class mersenne_twister : public _Circ_buf<_Ty, _Nx> { // mersenne twister generator public: @@ -1201,7 +1189,6 @@ basic_ostream<_Elem, _S_Traits>& operator<<(basic_ostream<_Elem, _S_Traits>& _Os return _Eng._Write(_Ostr); } -// CLASS TEMPLATE mersenne_twister_engine template class mersenne_twister_engine : public mersenne_twister<_Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx> { @@ -1286,7 +1273,6 @@ public: } }; -// CLASS TEMPLATE discard_block template class discard_block { // discard_block compound engine public: @@ -1400,7 +1386,6 @@ basic_ostream<_Elem, _Traits>& operator<<( return _Eng._Write(_Ostr); } -// CLASS TEMPLATE discard_block_engine template class discard_block_engine : public discard_block<_Engine, _Px, _Rx> { // discard_block_engine compound engine public: @@ -1429,7 +1414,6 @@ public: } }; -// CLASS TEMPLATE independent_bits_engine template class independent_bits_engine { // independent_bits_engine compound engine public: @@ -1593,7 +1577,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Eng._Write(_Ostr); } -// CLASS TEMPLATE shuffle_order_engine template class shuffle_order_engine { // shuffle_order_engine compound engine public: @@ -1728,7 +1711,6 @@ basic_ostream<_Elem, _Traits>& operator<<( return _Eng._Write(_Ostr); } -// CLASS TEMPLATE uniform_int template class uniform_int { // uniform integer distribution public: @@ -1882,7 +1864,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE uniform_int_distribution template class uniform_int_distribution : public uniform_int<_Ty> { // uniform integer distribution public: @@ -1920,7 +1901,6 @@ _NODISCARD bool operator!=(const uniform_int_distribution<_Ty>& _Left, const uni return !(_Left == _Right); } -// CLASS bernoulli_distribution class bernoulli_distribution { // class for bernoulli distribution public: using result_type = bool; @@ -2038,7 +2018,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// FUNCTION TEMPLATE _Float_upper_bound // Returns smallest _Flt such that static_cast<_Ty>(_Result) > _Val. // First truncate to largest _Flt <= _Val, then add ceil(ulp). @@ -2077,7 +2056,6 @@ _NODISCARD _Flt _Float_upper_bound(_Ty _Val) { } } -// CLASS TEMPLATE geometric_distribution template class geometric_distribution { // geometric distribution public: @@ -2211,7 +2189,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE poisson_distribution AND HELPER template class _Small_poisson_distribution { // poisson distribution with small mean public: @@ -2394,7 +2371,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE binomial_distribution template class binomial_distribution { // binomial distribution public: @@ -2601,7 +2577,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE uniform_real template class uniform_real { // uniform real distribution public: @@ -2725,7 +2700,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE uniform_real_distribution template class uniform_real_distribution : public uniform_real<_Ty> { // uniform real distribution public: @@ -2762,7 +2736,6 @@ _NODISCARD bool operator!=(const uniform_real_distribution<_Ty>& _Left, const un return !(_Left == _Right); } -// CLASS TEMPLATE exponential_distribution template class exponential_distribution { // exponential distribution public: @@ -2884,7 +2857,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE normal_distribution template class normal_distribution { // normal distribution public: @@ -3081,7 +3053,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE gamma_distribution template class gamma_distribution { // gamma distribution public: @@ -3277,7 +3248,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE weibull_distribution template class weibull_distribution { // weibull distribution public: @@ -3414,7 +3384,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE extreme_value_distribution template class extreme_value_distribution { // extreme value distribution public: @@ -3552,7 +3521,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE lognormal_distribution template class lognormal_distribution { // lognormal_distribution public: @@ -3688,7 +3656,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE chi_squared_distribution template class chi_squared_distribution { // chi squared distribution public: @@ -3810,7 +3777,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE cauchy_distribution template class cauchy_distribution { // Cauchy distribution public: @@ -3946,7 +3912,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE _Beta_distribution template class _Beta_distribution { // beta distribution public: @@ -4006,7 +3971,6 @@ private: _Ty _Bx; }; -// CLASS TEMPLATE fisher_f_distribution template class fisher_f_distribution { // fisher_f distribution public: @@ -4154,7 +4118,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE student_t_distribution template class student_t_distribution { // student_t distribution public: @@ -4291,7 +4254,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE negative_binomial_distribution template class negative_binomial_distribution { // negative binomial distribution public: @@ -4437,7 +4399,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE discrete_distribution template class discrete_distribution { // discrete integer distribution public: @@ -4634,7 +4595,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr, _Dist._Par); } -// CLASS TEMPLATE piecewise_constant_distribution template class piecewise_constant_distribution : public discrete_distribution { // piecewise constant floating-point distribution @@ -4827,7 +4787,6 @@ basic_ostream<_Elem, _Traits>& operator<<(basic_ostream<_Elem, _Traits>& _Ostr, return _Dist._Write(_Ostr); } -// CLASS TEMPLATE piecewise_linear_distribution template class piecewise_linear_distribution : public discrete_distribution { // piecewise linear floating-point distribution @@ -5107,7 +5066,6 @@ using knuth_b = shuffle_order_engine; using default_random_engine = mt19937; -// CLASS random_device _CRTIMP2_PURE unsigned int __CLRCALL_PURE_OR_CDECL _Random_device(); diff --git a/stl/inc/ranges b/stl/inc/ranges index f5d0ff9b36c..0dcd6fc0391 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -242,7 +242,6 @@ namespace ranges { template using _Cached_position_t = conditional_t<_Enable, _Cached_position<_Rng, _Derived>, view_interface<_Derived>>; - // CLASS TEMPLATE ranges::_Copyable_box template <_Copy_constructible_object _Ty> class _Copyable_box { // a simplified optional that augments copy_constructible types with full copyability public: @@ -453,7 +452,6 @@ namespace ranges { /* [[no_unique_address]] */ _Ty _Val = _Ty(); }; - // CLASS TEMPLATE ranges::_Defaultabox template class _Defaultabox { // a simplified optional that augments movable types with default-constructibility public: @@ -636,7 +634,6 @@ namespace ranges { /* [[no_unique_address]] */ _Ty _Value{}; }; - // CLASS TEMPLATE ranges::empty_view // clang-format off template requires is_object_v<_Ty> @@ -665,12 +662,10 @@ namespace ranges { }; namespace views { - // VARIABLE TEMPLATE views::empty template inline constexpr empty_view<_Ty> empty; } // namespace views - // CLASS TEMPLATE ranges::single_view // clang-format off template requires is_object_v<_Ty> @@ -724,7 +719,6 @@ namespace ranges { }; namespace views { - // VARIABLE views::single struct _Single_fn { // clang-format off template @@ -740,7 +734,6 @@ namespace ranges { inline constexpr _Single_fn single; } // namespace views - // CLASS TEMPLATE ranges::iota_view template using _Iota_diff_t = conditional_t, conditional_t<(sizeof(_Ty) < sizeof(int)), int, long long>, iter_difference_t<_Ty>>; @@ -1051,7 +1044,6 @@ namespace ranges { inline constexpr bool enable_borrowed_range> = true; namespace views { - // VARIABLE views::iota struct _Iota_fn { template _NODISCARD constexpr auto operator()(_Ty&& _Val) const @@ -1071,7 +1063,6 @@ namespace ranges { inline constexpr _Iota_fn iota; } // namespace views - // CLASS TEMPLATE ranges::istream_view template concept _Stream_extractable = requires(basic_istream<_Elem, _Traits>& __is, _Ty& __t) { __is >> __t; @@ -1154,7 +1145,6 @@ namespace ranges { return basic_istream_view<_Ty, _Elem, _Traits>{_Stream}; } - // CLASS TEMPLATE ranges::ref_view // clang-format off template requires is_object_v<_Rng> @@ -1212,7 +1202,6 @@ namespace ranges { inline constexpr bool enable_borrowed_range> = true; namespace views { - // VARIABLE views::all template concept _Can_ref_view = requires(_Rng&& __r) { ref_view{static_cast<_Rng&&>(__r)}; @@ -1272,7 +1261,6 @@ namespace ranges { using all_t = decltype(all(_STD declval<_Rng>())); } // namespace views - // CLASS TEMPLATE ranges::filter_view // clang-format off template > _Pr> requires view<_Vw> && is_object_v<_Pr> @@ -1505,7 +1493,6 @@ namespace ranges { filter_view(_Rng&&, _Pr) -> filter_view, _Pr>; namespace views { - // VARIABLE views::filter class _Filter_fn { private: template @@ -1547,7 +1534,6 @@ namespace ranges { inline constexpr _Filter_fn filter; } // namespace views - // CLASS TEMPLATE ranges::transform_view // clang-format off template // TRANSITION, LLVM-47414 concept _Can_const_transform = range && regular_invocable>; @@ -1995,7 +1981,6 @@ namespace ranges { transform_view(_Rng&&, _Fn) -> transform_view, _Fn>; namespace views { - // VARIABLE views::transform class _Transform_fn { private: template @@ -2037,7 +2022,6 @@ namespace ranges { inline constexpr _Transform_fn transform; } // namespace views - // CLASS TEMPLATE ranges::take_view template class take_view : public view_interface> { private: @@ -2204,7 +2188,6 @@ namespace ranges { inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; namespace views { - // VARIABLE views::take template inline constexpr bool _Is_subrange = false; template @@ -2339,7 +2322,6 @@ namespace ranges { inline constexpr _Take_fn take; } // namespace views - // CLASS TEMPLATE ranges::take_while_view // clang-format off template requires input_range<_Vw> && is_object_v<_Pr> && indirect_unary_predicate> @@ -2487,7 +2469,6 @@ namespace ranges { take_while_view(_Rng&&, _Pr) -> take_while_view, _Pr>; namespace views { - // VARIABLE views::take_while class _Take_while_fn { private: template @@ -2526,7 +2507,6 @@ namespace ranges { inline constexpr _Take_while_fn take_while; } // namespace views - // CLASS TEMPLATE ranges::drop_view template class drop_view : public _Cached_position_t && !(random_access_range<_Vw> && sized_range<_Vw>), _Vw, drop_view<_Vw>> { @@ -2649,7 +2629,6 @@ namespace ranges { inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; namespace views { - // VARIABLE views::drop class _Drop_fn { private: enum class _St { _Empty, _Reconstruct_span, _Reconstruct_subrange, _Reconstruct_other, _Drop_view }; @@ -2775,7 +2754,6 @@ namespace ranges { inline constexpr _Drop_fn drop; } // namespace views - // CLASS TEMPLATE ranges::drop_while_view // clang-format off template requires input_range<_Vw> && is_object_v<_Pr> && indirect_unary_predicate> @@ -2840,7 +2818,6 @@ namespace ranges { inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; namespace views { - // VARIABLE views::drop_while class _Drop_while_fn { private: template @@ -2879,7 +2856,6 @@ namespace ranges { inline constexpr _Drop_while_fn drop_while; } // namespace views - // CLASS TEMPLATE ranges::join_view // clang-format off template requires (view<_Vw> && input_range> @@ -3238,7 +3214,6 @@ namespace ranges { explicit join_view(_Rng&&) -> join_view>; namespace views { - // VARIABLE views::join class _Join_fn : public _Pipe::_Base<_Join_fn> { public: // clang-format off @@ -3255,7 +3230,6 @@ namespace ranges { inline constexpr _Join_fn join; } // namespace views - // CLASS TEMPLATE ranges::split_view // clang-format off template concept _Tiny_range = sized_range<_Ty> @@ -3632,7 +3606,6 @@ namespace ranges { split_view(_Rng&&, range_value_t<_Rng>) -> split_view, single_view>>; namespace views { - // VARIABLE views::split class _Split_fn { private: template @@ -3677,7 +3650,6 @@ namespace ranges { inline constexpr _Split_fn split; - // VARIABLE views::counted class _Counted_fn { private: enum class _St { _Span, _Subrange, _Subrange_counted }; @@ -3723,7 +3695,6 @@ namespace ranges { inline constexpr _Counted_fn counted; } // namespace views - // CLASS TEMPLATE ranges::common_view // clang-format off template requires (!common_range<_Vw> && copyable>) @@ -3800,7 +3771,6 @@ namespace ranges { inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; namespace views { - // VARIABLE views::common class _Common_fn : public _Pipe::_Base<_Common_fn> { private: enum class _St { _None, _All, _Common }; @@ -3840,7 +3810,6 @@ namespace ranges { inline constexpr _Common_fn common; } // namespace views - // CLASS TEMPLATE ranges::reverse_view // clang-format off template requires bidirectional_range<_Vw> @@ -3918,7 +3887,6 @@ namespace ranges { inline constexpr bool enable_borrowed_range> = enable_borrowed_range<_Rng>; namespace views { - // VARIABLE views::reverse template concept _Can_extract_base = requires(_Rng&& __r) { static_cast<_Rng&&>(__r).base(); @@ -3993,7 +3961,6 @@ namespace ranges { inline constexpr _Reverse_fn reverse; } // namespace views - // CLASS TEMPLATE ranges::elements_view template concept _Has_tuple_element = requires(_Tuple __t) { typename tuple_size<_Tuple>::type; @@ -4381,7 +4348,6 @@ namespace ranges { using values_view = elements_view, 1>; namespace views { - // VARIABLE views::elements template class _Elements_fn : public _Pipe::_Base<_Elements_fn<_Index>> { public: diff --git a/stl/inc/ratio b/stl/inc/ratio index f8562fb72c7..5876a8f88cf 100644 --- a/stl/inc/ratio +++ b/stl/inc/ratio @@ -19,11 +19,9 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// STRUCT TEMPLATE _Abs template struct _Abs : integral_constant {}; // computes absolute value of _Val -// STRUCT TEMPLATE _Safe_mult template ::value <= INTMAX_MAX / (_Bx == 0 ? 1 : _Abs<_Bx>::value))> struct _Safe_mult : integral_constant {}; // computes _Ax * _Bx without overflow @@ -33,11 +31,9 @@ struct _Safe_mult<_Ax, _Bx, _Sfinae, false> { // _Ax * _Bx would overflow static_assert(_Sfinae, "integer arithmetic overflow"); }; -// STRUCT TEMPLATE _Sign_of template struct _Sign_of : integral_constant {}; // computes sign of _Val -// STRUCT TEMPLATE _Safe_add template struct _Safe_addX : integral_constant {}; // computes _Ax + _Bx without overflow @@ -52,7 +48,6 @@ struct _Safe_add : _Safe_addX<_Ax, _Bx, _Sign_of<_Ax>::value != _Sign_of<_Bx>::v // computes _Ax + _Bx, forbids overflow }; -// STRUCT TEMPLATE _Gcd template struct _GcdX : _GcdX<_Bx, _Ax % _Bx>::type {}; // computes GCD of _Ax and _Bx @@ -67,7 +62,6 @@ struct _Gcd<0, 0> : integral_constant { // contrary to mathematical convention; avoids division by 0 in ratio_less }; -// STRUCT TEMPLATE ratio template struct ratio { // holds the ratio of _Nx to _Dx static_assert(_Dx != 0, "zero denominator"); @@ -82,7 +76,6 @@ struct ratio { // holds the ratio of _Nx to _Dx using type = ratio; }; -// VARIABLE TEMPLATE _Is_ratio_v template _INLINE_VAR constexpr bool _Is_ratio_v = false; // test for ratio type @@ -174,7 +167,6 @@ using _Ratio_divide_sfinae = template using ratio_divide = _Ratio_divide_sfinae<_Rx1, _Rx2, false>; -// STRUCT TEMPLATE ratio_equal template struct ratio_equal : bool_constant<_Rx1::num == _Rx2::num && _Rx1::den == _Rx2::den> { // tests if ratio == ratio static_assert(_Is_ratio_v<_Rx1> && _Is_ratio_v<_Rx2>, "ratio_equal requires R1 and R2 to be ratio<>s."); @@ -183,7 +175,6 @@ struct ratio_equal : bool_constant<_Rx1::num == _Rx2::num && _Rx1::den == _Rx2:: template _INLINE_VAR constexpr bool ratio_equal_v = ratio_equal<_Rx1, _Rx2>::value; -// STRUCT TEMPLATE ratio_not_equal template struct ratio_not_equal : bool_constant> { // tests if ratio != ratio static_assert(_Is_ratio_v<_Rx1> && _Is_ratio_v<_Rx2>, "ratio_not_equal requires R1 and R2 to be ratio<>s."); @@ -192,7 +183,6 @@ struct ratio_not_equal : bool_constant> { // tests if template _INLINE_VAR constexpr bool ratio_not_equal_v = ratio_not_equal<_Rx1, _Rx2>::value; -// STRUCT TEMPLATE ratio_less struct _Big_uint128 { uint64_t _Upper; uint64_t _Lower; @@ -249,7 +239,6 @@ struct ratio_less : bool_constant<_Ratio_less(_Rx1::num, _Rx1::den, _Rx2::num, _ template _INLINE_VAR constexpr bool ratio_less_v = ratio_less<_Rx1, _Rx2>::value; -// STRUCT TEMPLATE ratio_less_equal template struct ratio_less_equal : bool_constant> { // tests if ratio <= ratio static_assert( @@ -259,7 +248,6 @@ struct ratio_less_equal : bool_constant> { // tests if template _INLINE_VAR constexpr bool ratio_less_equal_v = ratio_less_equal<_Rx1, _Rx2>::value; -// STRUCT TEMPLATE ratio_greater template struct ratio_greater : ratio_less<_Rx2, _Rx1>::type { // tests if ratio > ratio static_assert(_Is_ratio_v<_Rx1> && _Is_ratio_v<_Rx2>, "ratio_greater requires R1 and R2 to be ratio<>s."); @@ -268,7 +256,6 @@ struct ratio_greater : ratio_less<_Rx2, _Rx1>::type { // tests if ratio > ratio template _INLINE_VAR constexpr bool ratio_greater_v = ratio_greater<_Rx1, _Rx2>::value; -// STRUCT TEMPLATE ratio_greater_equal template struct ratio_greater_equal : bool_constant> { // tests if ratio >= ratio static_assert( diff --git a/stl/inc/regex b/stl/inc/regex index 02badc1ed90..c4df7af6ed2 100644 --- a/stl/inc/regex +++ b/stl/inc/regex @@ -161,7 +161,6 @@ namespace regex_constants { [[noreturn]] _CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xregex_error(regex_constants::error_type _Code); -// CLASS TEMPLATE regex_traits template class regex_traits; @@ -389,7 +388,6 @@ private: locale_type _Loc; }; -// CLASS regex_traits template <> class regex_traits : public _Regex_traits { public: @@ -414,7 +412,6 @@ public: } }; -// CLASS regex_traits template <> class regex_traits : public _Regex_traits { public: @@ -439,7 +436,6 @@ public: } }; -// CLASS regex_error class regex_error : public runtime_error { // type of all regular expression exceptions public: explicit regex_error(regex_constants::error_type _Ex) : runtime_error(_Stringify(_Ex)), _Err(_Ex) {} @@ -507,7 +503,6 @@ private: regex_constants::error_type _Err; }; -// FUNCTION TEMPLATE _Iter_compare template int _Iter_compare3(_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Last2, true_type) { // _Iter_compare for memory buffer ranges @@ -562,7 +557,6 @@ int _Iter_compare(_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2, _FwdIt2 _Las _Get_unwrapped(_First1), _Get_unwrapped(_Last1), _Get_unwrapped(_First2), _Get_unwrapped(_Last2)); } -// FUNCTION TEMPLATE _Is_word inline bool _Is_word(unsigned char _UCh) { // special casing char to avoid branches for std::regex in this path static constexpr bool _Is_word_table[(numeric_limits::max) () + 1] = { @@ -605,7 +599,6 @@ struct _Get_member_comparison_category<_Ty, void_t class sub_match : public pair<_BidIt, _BidIt> { // class to hold contents of a capture group public: @@ -993,7 +986,6 @@ template _OutIt _Format_sed(const match_results<_BidIt, _Alloc>& _Match, _OutIt _Out, _InIt _First, _InIt _Last, regex_constants::match_flag_type _Flags = regex_constants::format_default); -// CLASS TEMPLATE match_results template class match_results { // class to hold contents of all capture groups public: @@ -1235,7 +1227,6 @@ enum _Node_type { // type flag for nfa nodes _N_end }; -// STRUCT TEMPLATE _Buf template struct _Buf { // character buffer _Buf() : _Sz(0), _Nchrs(0), _Chrs(nullptr) {} @@ -1295,7 +1286,6 @@ private: _Elem* _Chrs; }; -// STRUCT _Bitmap struct _Bitmap { // accelerator table for small character values _Bitmap() { _CSTD memset(_Chrs, '\0', _Bmp_size); @@ -1319,7 +1309,6 @@ private: unsigned char _Chrs[_Bmp_size]; }; -// STRUCT TEMPLATE _Sequence template struct _Sequence { // holds sequences of _Sz elements explicit _Sequence(unsigned int _Len) : _Sz(_Len) {} @@ -1329,7 +1318,6 @@ struct _Sequence { // holds sequences of _Sz elements _Sequence* _Next; }; -// CLASS _Node_base class _Node_base { // base class for all nfa nodes public: explicit _Node_base(_Node_type _Ty, _Node_flags _Fl = _Fl_none) @@ -1343,7 +1331,6 @@ public: virtual ~_Node_base() noexcept {} }; -// FUNCTION _Destroy_node inline void _Destroy_node(_Node_base* _Nx, _Node_base* _Ne = nullptr) noexcept { // destroy sublist of nodes while (_Nx != _Ne && _Nx) { // destroy node _Node_base* _Tmp = _Nx; @@ -1353,7 +1340,6 @@ inline void _Destroy_node(_Node_base* _Nx, _Node_base* _Ne = nullptr) noexcept { } } -// CLASS _Root_node class _Root_node : public _Node_base { // root of parse tree public: _Root_node() : _Node_base(_N_begin), _Loops(0), _Marks(0), _Refs(0) { @@ -1366,7 +1352,6 @@ public: unsigned int _Refs; }; -// CLASS _Node_end_group class _Node_end_group : public _Node_base { // node that marks end of a group public: _Node_end_group(_Node_type _Ty, _Node_flags _Fl, _Node_base* _Bx) : _Node_base(_Ty, _Fl), _Back(_Bx) {} @@ -1374,7 +1359,6 @@ public: _Node_base* _Back; }; -// CLASS _Node_assert class _Node_assert : public _Node_base { // node that holds an ECMAScript assertion public: explicit _Node_assert(_Node_type _Ty, _Node_flags _Fl = _Fl_none) : _Node_base(_Ty, _Fl), _Child(nullptr) {} @@ -1386,7 +1370,6 @@ public: _Node_base* _Child; }; -// CLASS TEMPLATE _Node_capture class _Node_capture : public _Node_base { // node that marks beginning of a capture group public: explicit _Node_capture(unsigned int _Ix) : _Node_base(_N_capture, _Fl_none), _Idx(_Ix) {} @@ -1394,7 +1377,6 @@ public: unsigned int _Idx; }; -// CLASS _Node_back class _Node_back : public _Node_base { // node that holds a back reference public: explicit _Node_back(unsigned int _Ix) : _Node_base(_N_back, _Fl_none), _Idx(_Ix) {} @@ -1402,7 +1384,6 @@ public: unsigned int _Idx; }; -// CLASS TEMPLATE _Node_str template class _Node_str : public _Node_base { // node that holds text public: @@ -1411,7 +1392,6 @@ public: _Buf<_Elem> _Data; }; -// CLASS TEMPLATE _Node_class template class _Node_class : public _Node_base { // node that holds a character class (POSIX bracket expression) public: @@ -1443,13 +1423,11 @@ public: _Sequence<_Elem>* _Equiv; }; -// CLASS _Node_endif class _Node_endif : public _Node_base { // node that marks the end of an alternative public: _Node_endif() : _Node_base(_N_endif, _Fl_none) {} }; -// CLASS _Node_if class _Node_if : public _Node_base { // node that marks the beginning of an alternative public: explicit _Node_if(_Node_base* _End) @@ -1469,7 +1447,6 @@ public: _Node_if* _Child; }; -// CLASS _Node_end_rep class _Node_rep; class _Node_end_rep : public _Node_base { // node that marks the end of a repetition @@ -1481,13 +1458,11 @@ public: _Node_end_rep& operator=(const _Node_end_rep&) = delete; }; -// CLASS _Loop_vals_t struct _Loop_vals_t { // storage for loop administration int _Loop_idx; void* _Loop_iter; }; -// CLASS _Node_rep class _Node_rep : public _Node_base { // node that marks the beginning of a repetition public: _Node_rep(bool _Greedy, int _Mn, int _Mx, _Node_end_rep* _End, unsigned int _Number) @@ -1503,7 +1478,6 @@ public: _Node_rep& operator=(const _Node_rep&) = delete; }; -// CLASS TEMPLATE _Builder template class _Builder { // provides operations used by _Parser to build the nfa public: @@ -1566,7 +1540,6 @@ public: _Builder& operator=(const _Builder&) = delete; }; -// CLASS TEMPLATE _Bt_state_t template class _Bt_state_t { // holds the state needed for backtracking public: @@ -1574,7 +1547,6 @@ public: vector _Grp_valid; }; -// CLASS TEMPLATE _Tgt_state_t template class _Tgt_state_t : public _Bt_state_t<_BidIt> { // holds the current state of the match public: @@ -1590,7 +1562,6 @@ public: } }; -// CLASS TEMPLATE _Matcher template class _Matcher { // provides ways to match a regular expression to a text sequence public: @@ -1711,7 +1682,6 @@ enum _Prs_ret { // indicate class element type _Prs_set }; -// CLASS TEMPLATE _Parser template class _Parser { // parse a regular expression public: @@ -1807,7 +1777,6 @@ enum _Lang_flags { // describe language properties _L_mtch_long = 0x40000000, // find longest match (ERE, BRE) }; -// CLASS _Regex_base class _Regex_base : public _Container_base { // base class for basic_regex to construct and destroy proxy public: #if 0 < _ITERATOR_DEBUG_LEVEL @@ -1824,7 +1793,6 @@ public: #endif // 0 < _ITERATOR_DEBUG_LEVEL }; -// CLASS TEMPLATE basic_regex template > class basic_regex : public _Regex_base { // regular expression public: @@ -2095,7 +2063,6 @@ using wcmatch = match_results; using smatch = match_results; using wsmatch = match_results; -// FUNCTION TEMPLATE _Format_default template _OutIt _Format_default(const match_results<_BidIt, _Alloc>& _Match, _OutIt _Out, _InIt _First, _InIt _Last, regex_constants::match_flag_type) { // format with ECMAScript rules @@ -2142,7 +2109,6 @@ _OutIt _Format_default(const match_results<_BidIt, _Alloc>& _Match, _OutIt _Out, return _Out; } -// FUNCTION TEMPLATE _Format_sed template _OutIt _Format_sed(const match_results<_BidIt, _Alloc>& _Match, _OutIt _Out, _InIt _First, _InIt _Last, regex_constants::match_flag_type) { // format with sed rules @@ -2169,7 +2135,6 @@ _OutIt _Format_sed(const match_results<_BidIt, _Alloc>& _Match, _OutIt _Out, _In return _Out; } -// FUNCTION TEMPLATE _Regex_match1 template bool _Regex_match1(_It _First, _It _Last, match_results<_BidIt, _Alloc>* _Matches, const basic_regex<_Elem, _RxTraits>& _Re, regex_constants::match_flag_type _Flgs, @@ -2183,7 +2148,6 @@ bool _Regex_match1(_It _First, _It _Last, match_results<_BidIt, _Alloc>* _Matche return _Mx._Match(_Matches, _Full); } -// FUNCTION TEMPLATE regex_match template bool regex_match(_BidIt _First, _BidIt _Last, match_results<_BidIt, _Alloc>& _Matches, const basic_regex<_Elem, _RxTraits>& _Re, regex_constants::match_flag_type _Flgs = regex_constants::match_default) { @@ -2240,7 +2204,6 @@ _NODISCARD bool regex_match(const basic_string<_Elem, _StTraits, _StAlloc>& _Str _Re, _Flgs | regex_constants::match_any, true); } -// FUNCTION TEMPLATE _Regex_search2 template bool _Regex_search2(_It _First, _It _Last, match_results<_BidIt, _Alloc>* _Matches, const basic_regex<_Elem, _RxTraits>& _Re, regex_constants::match_flag_type _Flgs, _It _Org) { @@ -2283,7 +2246,6 @@ bool _Regex_search2(_It _First, _It _Last, match_results<_BidIt, _Alloc>* _Match return _Found; } -// FUNCTION TEMPLATE regex_search template bool regex_search(_BidIt _First, _BidIt _Last, match_results<_BidIt, _Alloc>& _Matches, const basic_regex<_Elem, _RxTraits>& _Re, regex_constants::match_flag_type _Flgs = regex_constants::match_default) { @@ -2344,7 +2306,6 @@ _NODISCARD bool regex_search(const basic_string<_Elem, _StTraits, _StAlloc>& _St _First, _Last, static_cast*>(nullptr), _Re, _Flgs | regex_constants::match_any, _First); } -// FUNCTION TEMPLATE regex_replace template _OutIt _Regex_replace1(_OutIt _Result, _BidIt _First, _BidIt _Last, const basic_regex<_Elem, _RxTraits>& _Re, const basic_string<_Elem, _Traits, _Alloc>& _Fmt, regex_constants::match_flag_type _Flgs) { @@ -2439,7 +2400,6 @@ _NODISCARD basic_string<_Elem> regex_replace(const _Elem* _Pstr, const basic_reg return _Res; } -// CLASS TEMPLATE regex_iterator template , class _RxTraits = regex_traits<_Elem>> class regex_iterator : public _Iterator_base { public: @@ -2569,7 +2529,6 @@ using wcregex_iterator = regex_iterator; using sregex_iterator = regex_iterator; using wsregex_iterator = regex_iterator; -// CLASS TEMPLATE regex_token_iterator template , class _RxTraits = regex_traits<_Elem>> class regex_token_iterator { public: diff --git a/stl/inc/scoped_allocator b/stl/inc/scoped_allocator index e35dfaf2db3..40e79da8964 100644 --- a/stl/inc/scoped_allocator +++ b/stl/inc/scoped_allocator @@ -18,7 +18,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// FUNCTION TEMPLATE _Scoped_outermost template struct _Scoped_outermost_helper { // gets the outermost allocator static decltype(auto) _Fn(_Alloc& _Al) { // gets the outermost allocator @@ -49,7 +48,6 @@ using _Scoped_outermost_t = remove_reference_t using _Scoped_outermost_traits = allocator_traits<_Scoped_outermost_t<_Alloc>>; -// CLASS TEMPLATE _Scoped_base template class scoped_allocator_adaptor; @@ -125,7 +123,6 @@ struct _Scoped_base<_Outer> : _Outer { // nest of allocators, one deep } }; -// CLASS TEMPLATE scoped_allocator_adaptor template class scoped_allocator_adaptor : public _Scoped_base<_Outer, _Inner...> { // nest of allocators using _Mybase = _Scoped_base<_Outer, _Inner...>; diff --git a/stl/inc/set b/stl/inc/set index f45bd81991d..ffb4c5cf5b9 100644 --- a/stl/inc/set +++ b/stl/inc/set @@ -21,7 +21,6 @@ _STL_DISABLE_CLANG_WARNINGS #pragma push_macro("new") #undef new _STD_BEGIN -// CLASS TEMPLATE _Tset_traits template , class _Alloc = allocator<_Kty>> class set : public _Tree<_Tset_traits<_Kty, _Pr, _Alloc, false>> { // ordered red-black tree of key values, unique keys @@ -229,7 +227,6 @@ typename set<_Kty, _Keylt, _Alloc>::size_type erase_if(set<_Kty, _Keylt, _Alloc> } #endif // _HAS_CXX20 -// CLASS TEMPLATE multiset template , class _Alloc = allocator<_Kty>> class multiset : public _Tree<_Tset_traits<_Kty, _Pr, _Alloc, true>> { // ordered red-black tree of key values, non-unique keys diff --git a/stl/inc/shared_mutex b/stl/inc/shared_mutex index a735ca0938c..896ae926b88 100644 --- a/stl/inc/shared_mutex +++ b/stl/inc/shared_mutex @@ -27,7 +27,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS shared_mutex class shared_mutex { // class for mutual exclusion shared across threads public: using native_handle_type = _Smtx_t*; @@ -74,7 +73,6 @@ private: // shared_timed_mutex is not supported under /clr #ifndef _M_CEE -// CLASS shared_timed_mutex class shared_timed_mutex { // class for mutual exclusion shared across threads using _Read_cnt_t = unsigned int; @@ -231,7 +229,6 @@ private: }; #endif // _M_CEE -// CLASS TEMPLATE shared_lock template class shared_lock { // shareable lock public: diff --git a/stl/inc/span b/stl/inc/span index 36a5e9b3181..c1d18faa1ff 100644 --- a/stl/inc/span +++ b/stl/inc/span @@ -29,7 +29,6 @@ _STD_BEGIN inline constexpr size_t dynamic_extent = static_cast(-1); -// STRUCT TEMPLATE _Span_iterator template struct _Span_iterator { #ifdef __cpp_lib_concepts @@ -198,7 +197,6 @@ struct pointer_traits<_Span_iterator<_Ty>> { } }; -// STRUCT TEMPLATE _Span_extent_type template struct _Span_extent_type { using pointer = _Ty*; @@ -238,14 +236,12 @@ namespace ranges { inline constexpr bool enable_borrowed_range> = true; } // namespace ranges -// VARIABLE TEMPLATE _Is_span_v template inline constexpr bool _Is_span_v = false; template inline constexpr bool _Is_span_v> = true; -// VARIABLE TEMPLATE _Is_std_array_v template inline constexpr bool _Is_std_array_v = false; @@ -276,26 +272,22 @@ concept _Span_compatible_range = // clang-format on #else // ^^^ __cpp_lib_concepts / !__cpp_lib_concepts vvv -// STRUCT TEMPLATE _Is_span template struct _Is_span : false_type {}; template struct _Is_span> : true_type {}; -// STRUCT TEMPLATE _Is_std_array template struct _Is_std_array : false_type {}; template struct _Is_std_array> : true_type {}; -// STRUCT TEMPLATE _Is_span_convertible_range template struct _Is_span_convertible_range : bool_constant()))> (*)[], _Ty (*)[]>> {}; -// STRUCT TEMPLATE _Has_container_interface template struct _Has_container_interface : false_type {}; @@ -303,7 +295,6 @@ template struct _Has_container_interface<_Rng, void_t())), decltype(_STD size(_STD declval<_Rng&>()))>> : true_type {}; -// VARIABLE TEMPLATE _Is_span_compatible_range // clang-format off template inline constexpr bool _Is_span_compatible_range = conjunction_v< @@ -317,7 +308,6 @@ inline constexpr bool _Is_span_compatible_range = conjunction_v< #endif // !__cpp_lib_concepts // [views.span] -// CLASS TEMPLATE span template class span : private _Span_extent_type<_Ty, _Extent> { private: @@ -675,14 +665,12 @@ span(const _Rng&) -> span; #ifdef __cpp_lib_byte // [span.objectrep] Views of object representation -// FUNCTION TEMPLATE as_bytes template _NODISCARD auto as_bytes(span<_Ty, _Extent> _Sp) noexcept { using _ReturnType = span; return _ReturnType{reinterpret_cast(_Sp.data()), _Sp.size_bytes()}; } -// FUNCTION TEMPLATE as_writable_bytes template , int> = 0> _NODISCARD auto as_writable_bytes(span<_Ty, _Extent> _Sp) noexcept { using _ReturnType = span; diff --git a/stl/inc/sstream b/stl/inc/sstream index e18be8fe5ca..19622bced2a 100644 --- a/stl/inc/sstream +++ b/stl/inc/sstream @@ -19,7 +19,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE basic_stringbuf template class basic_stringbuf : public basic_streambuf<_Elem, _Traits> { // stream buffer maintaining an allocated character array @@ -544,7 +543,6 @@ void swap(basic_stringbuf<_Elem, _Traits, _Alloc>& _Left, basic_stringbuf<_Elem, _Left.swap(_Right); } -// CLASS TEMPLATE basic_istringstream template class basic_istringstream : public basic_istream<_Elem, _Traits> { // input stream associated with a character array public: @@ -664,7 +662,6 @@ void swap(basic_istringstream<_Elem, _Traits, _Alloc>& _Left, basic_istringstrea _Left.swap(_Right); } -// CLASS TEMPLATE basic_ostringstream template class basic_ostringstream : public basic_ostream<_Elem, _Traits> { // output stream associated with a character array public: @@ -784,7 +781,6 @@ void swap(basic_ostringstream<_Elem, _Traits, _Alloc>& _Left, basic_ostringstrea _Left.swap(_Right); } -// CLASS TEMPLATE basic_stringstream template class basic_stringstream : public basic_iostream<_Elem, _Traits> { // input/output stream associated with a character array diff --git a/stl/inc/stack b/stl/inc/stack index 6a9a191ba8a..d9f82b5239c 100644 --- a/stl/inc/stack +++ b/stl/inc/stack @@ -18,7 +18,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE stack template > class stack { public: diff --git a/stl/inc/stdexcept b/stl/inc/stdexcept index 844aad34d04..c5e1a3302e1 100644 --- a/stl/inc/stdexcept +++ b/stl/inc/stdexcept @@ -18,7 +18,6 @@ _STL_DISABLE_CLANG_WARNINGS #pragma push_macro("new") #undef new _STD_BEGIN -// CLASS logic_error class logic_error : public exception { // base of all logic-error exceptions public: using _Mybase = exception; @@ -35,7 +34,6 @@ protected: #endif // !_HAS_EXCEPTIONS }; -// CLASS domain_error class domain_error : public logic_error { // base of all domain-error exceptions public: using _Mybase = logic_error; @@ -52,7 +50,6 @@ protected: #endif // !_HAS_EXCEPTIONS }; -// CLASS invalid_argument class invalid_argument : public logic_error { // base of all invalid-argument exceptions public: using _Mybase = logic_error; @@ -69,7 +66,6 @@ protected: #endif // !_HAS_EXCEPTIONS }; -// CLASS length_error class length_error : public logic_error { // base of all length-error exceptions public: using _Mybase = logic_error; @@ -86,7 +82,6 @@ protected: #endif // !_HAS_EXCEPTIONS }; -// CLASS out_of_range class out_of_range : public logic_error { // base of all out-of-range exceptions public: using _Mybase = logic_error; @@ -103,7 +98,6 @@ protected: #endif // !_HAS_EXCEPTIONS }; -// CLASS runtime_error class runtime_error : public exception { // base of all runtime-error exceptions public: using _Mybase = exception; @@ -120,7 +114,6 @@ protected: #endif // !_HAS_EXCEPTIONS }; -// CLASS overflow_error class overflow_error : public runtime_error { // base of all overflow-error exceptions public: using _Mybase = runtime_error; @@ -137,7 +130,6 @@ protected: #endif // !_HAS_EXCEPTIONS }; -// CLASS underflow_error class underflow_error : public runtime_error { // base of all underflow-error exceptions public: using _Mybase = runtime_error; @@ -154,7 +146,6 @@ protected: #endif // !_HAS_EXCEPTIONS }; -// CLASS range_error class range_error : public runtime_error { // base of all range-error exceptions public: using _Mybase = runtime_error; diff --git a/stl/inc/streambuf b/stl/inc/streambuf index ce41dd05566..081b1ff9820 100644 --- a/stl/inc/streambuf +++ b/stl/inc/streambuf @@ -18,7 +18,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE basic_streambuf template class basic_streambuf { // control read/write buffers protected: diff --git a/stl/inc/string b/stl/inc/string index e298a1b771d..b386f36199e 100644 --- a/stl/inc/string +++ b/stl/inc/string @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// FUNCTION TEMPLATE getline template basic_istream<_Elem, _Traits>& getline(basic_istream<_Elem, _Traits>&& _Istr, basic_string<_Elem, _Traits, _Alloc>& _Str, diff --git a/stl/inc/strstream b/stl/inc/strstream index d90ed93ca24..0e832ba2e15 100644 --- a/stl/inc/strstream +++ b/stl/inc/strstream @@ -22,7 +22,6 @@ _STD_BEGIN _CXX17_DEPRECATE_STRSTREAM typedef int _Header_strstream; using _Hdr_strstream = _Header_strstream; -// CLASS strstreambuf class strstreambuf : public streambuf { // stream buffer associated with static or allocated character array public: using _Mysb = streambuf; @@ -425,7 +424,6 @@ inline void swap(strstreambuf& _Left, strstreambuf& _Right) { _Left.swap(_Right); } -// CLASS istrstream class istrstream : public istream { // input stream associated with a character array public: using _Mybase = istream; @@ -490,7 +488,6 @@ inline void swap(istrstream& _Left, istrstream& _Right) { _Left.swap(_Right); } -// CLASS ostrstream class ostrstream : public ostream { // output stream associated with a character array public: using _Mybase = ostream; @@ -554,7 +551,6 @@ inline void swap(ostrstream& _Left, ostrstream& _Right) { _Left.swap(_Right); } -// CLASS strstream class strstream : public iostream { // input/output stream associated with character array buffer public: using _Mybase = iostream; diff --git a/stl/inc/syncstream b/stl/inc/syncstream index 434a1cd7a7f..9668a224a05 100644 --- a/stl/inc/syncstream +++ b/stl/inc/syncstream @@ -32,7 +32,6 @@ _END_EXTERN_C _STD_BEGIN -// CLASS TEMPLATE _Basic_syncbuf_impl template class _Basic_syncbuf_impl : public basic_streambuf<_Elem, _Traits> { public: @@ -67,7 +66,6 @@ protected: bool _Sync_recorded{false}; }; -// CLASS TEMPLATE basic_syncbuf template class basic_syncbuf : public _Basic_syncbuf_impl<_Elem, _Traits> { public: @@ -319,7 +317,6 @@ void swap(basic_syncbuf<_Elem, _Traits, _Alloc>& _Left, _Left.swap(_Right); } -// CLASS TEMPLATE basic_osyncstream template class basic_osyncstream : public basic_ostream<_Elem, _Traits> { public: diff --git a/stl/inc/system_error b/stl/inc/system_error index a9b527db251..c62d0f3cbba 100644 --- a/stl/inc/system_error +++ b/stl/inc/system_error @@ -30,12 +30,10 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// ENUM CLASS io_errc enum class io_errc { // error codes for ios_base::failure stream = 1 }; -// STRUCT TEMPLATE is_error_code_enum template struct is_error_code_enum : false_type {}; @@ -45,7 +43,6 @@ struct is_error_code_enum : true_type {}; template _INLINE_VAR constexpr bool is_error_code_enum_v = is_error_code_enum<_Ty>::value; -// STRUCT TEMPLATE is_error_condition_enum template struct is_error_condition_enum : false_type {}; @@ -62,7 +59,6 @@ _NODISCARD error_code make_error_code(io_errc) noexcept; _NODISCARD error_condition make_error_condition(errc) noexcept; _NODISCARD error_condition make_error_condition(io_errc) noexcept; -// CLASS error_category class error_category; _NODISCARD const error_category& generic_category() noexcept; @@ -131,7 +127,6 @@ protected: _NODISCARD inline bool _System_error_equal(const error_code&, const error_condition&) noexcept; #endif // _STL_OPTIMIZE_SYSTEM_ERROR_OPERATORS -// CLASS error_code class error_code { // store an implementation-specific error code and category public: error_code() noexcept : _Myval(0), _Mycat(&_STD system_category()) {} // construct non-error @@ -224,7 +219,6 @@ private: const error_category* _Mycat; // pointer to error category }; -// CLASS error_condition class error_condition { // store an abstract error code and category public: error_condition() noexcept : _Myval(0), _Mycat(&_STD generic_category()) {} // construct non-error @@ -397,7 +391,6 @@ _NODISCARD inline error_condition error_code::default_error_condition() const no return category().default_error_condition(value()); } -// FUNCTION make_error_code _NODISCARD inline error_code make_error_code(errc _Errno) noexcept { return error_code(static_cast(_Errno), _STD generic_category()); } @@ -406,7 +399,6 @@ _NODISCARD inline error_code make_error_code(io_errc _Errno) noexcept { return error_code(static_cast(_Errno), _STD iostream_category()); } -// FUNCTION make_error_condition _NODISCARD inline error_condition make_error_condition(errc _Errno) noexcept { return error_condition(static_cast(_Errno), _STD generic_category()); } @@ -415,7 +407,6 @@ _NODISCARD inline error_condition make_error_condition(io_errc _Errno) noexcept return error_condition(static_cast(_Errno), _STD iostream_category()); } -// STRUCT TEMPLATE SPECIALIZATION hash template <> struct hash { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef error_code _ARGUMENT_TYPE_NAME; @@ -436,7 +427,6 @@ struct hash { } }; -// CLASS system_error class _System_error : public runtime_error { // base of all system-error exceptions private: static string _Makestr(error_code _Errcode, string _Message) { // compose error message diff --git a/stl/inc/thread b/stl/inc/thread index 48275183c09..ef864b20b5f 100644 --- a/stl/inc/thread +++ b/stl/inc/thread @@ -276,7 +276,6 @@ basic_ostream<_Ch, _Tr>& operator<<(basic_ostream<_Ch, _Tr>& _Str, thread::id _I return _Str << _Id._Id; } -// STRUCT TEMPLATE SPECIALIZATION hash template <> struct hash { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef thread::id _ARGUMENT_TYPE_NAME; diff --git a/stl/inc/tuple b/stl/inc/tuple index 6e69ab4f25b..5e996e48829 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -23,7 +23,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN #if _HAS_CONDITIONAL_EXPLICIT -// VARIABLE TEMPLATE _Tuple_conditional_explicit_v template _INLINE_VAR constexpr bool _Tuple_conditional_explicit_v0 = false; @@ -35,7 +34,6 @@ template _INLINE_VAR constexpr bool _Tuple_conditional_explicit_v = _Tuple_conditional_explicit_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; #else // ^^^ _HAS_CONDITIONAL_EXPLICIT ^^^ / vvv !_HAS_CONDITIONAL_EXPLICIT vvv -// STRUCT TEMPLATE _Tuple_implicit_val // Constrain tuple's implicit constructors template _INLINE_VAR constexpr bool _Tuple_implicit_v0 = false; @@ -48,7 +46,6 @@ template struct _Tuple_implicit_val : bool_constant<_Tuple_implicit_v0 == sizeof...(_Srcs), _Dest, _Srcs...>> {}; -// STRUCT TEMPLATE _Tuple_explicit_val // Constrain tuple's explicit constructors template _INLINE_VAR constexpr bool _Tuple_explicit_v0 = false; @@ -62,7 +59,6 @@ struct _Tuple_explicit_val : bool_constant<_Tuple_explicit_v0 == sizeof...(_Srcs), _Dest, _Srcs...>> {}; #endif // ^^^ !_HAS_CONDITIONAL_EXPLICIT ^^^ -// VARIABLE TEMPLATE _Tuple_constructible_v template _INLINE_VAR constexpr bool _Tuple_constructible_v0 = false; @@ -77,7 +73,6 @@ _INLINE_VAR constexpr bool _Tuple_constructible_v = template struct _Tuple_constructible_val : bool_constant<_Tuple_constructible_v<_Dest, _Srcs...>> {}; -// VARIABLE TEMPLATE _Tuple_nothrow_constructible_v template _INLINE_VAR constexpr bool _Tuple_nothrow_constructible_v0 = false; @@ -89,7 +84,6 @@ template _INLINE_VAR constexpr bool _Tuple_nothrow_constructible_v = _Tuple_nothrow_constructible_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; -// VARIABLE TEMPLATE _Tuple_assignable_v template _INLINE_VAR constexpr bool _Tuple_assignable_v0 = false; @@ -104,7 +98,6 @@ _INLINE_VAR constexpr bool _Tuple_assignable_v = template struct _Tuple_assignable_val : bool_constant<_Tuple_assignable_v<_Dest, _Srcs...>> {}; -// VARIABLE TEMPLATE _Tuple_nothrow_assignable_v template _INLINE_VAR constexpr bool _Tuple_nothrow_assignable_v0 = false; @@ -116,7 +109,6 @@ template _INLINE_VAR constexpr bool _Tuple_nothrow_assignable_v = _Tuple_nothrow_assignable_v0 == sizeof...(_Srcs), _Dest, _Srcs...>; -// STRUCT TEMPLATE _Tuple_convert_copy_val // Constrain tuple's copy converting constructor (LWG-2549) template struct _Tuple_convert_copy_val : true_type {}; @@ -126,7 +118,6 @@ struct _Tuple_convert_copy_val, _Uty> : bool_constant, is_constructible<_This, const tuple<_Uty>&>, is_convertible&, _This>>> {}; -// STRUCT TEMPLATE _Tuple_convert_move_val // Constrain tuple's move converting constructor (LWG-2549) template struct _Tuple_convert_move_val : true_type {}; @@ -136,7 +127,6 @@ struct _Tuple_convert_move_val, _Uty> : bool_constant, is_constructible<_This, tuple<_Uty>>, is_convertible, _This>>> {}; -// STRUCT TEMPLATE _Tuple_perfect_val // Constrain tuple's perfect forwarding constructor (LWG-3121) template struct _Tuple_perfect_val : true_type {}; @@ -145,7 +135,6 @@ template struct _Tuple_perfect_val<_Myself, _This2> : bool_constant>>> {}; -// STRUCT _Ignore struct _Ignore { // struct that ignores assignments template constexpr const _Ignore& operator=(const _Ty&) const noexcept /* strengthened */ { @@ -161,7 +150,6 @@ _INLINE_VAR constexpr _Ignore ignore{}; // some class - including injected-class-names! - that we know are not members of the class being defined. // This avoids pointless class-member lookup for those names in this context. -// STRUCT TEMPLATE _Tuple_val template struct _Tuple_val { // stores each value in a tuple constexpr _Tuple_val() : _Val() {} @@ -189,7 +177,6 @@ struct _Tuple_val { // stores each value in a tuple _Ty _Val; }; -// CLASS TEMPLATE tuple struct _Exact_args_t { explicit _Exact_args_t() = default; }; // tag type to disambiguate construction (from one arg per element) @@ -796,7 +783,6 @@ _CONSTEXPR20 void swap(tuple<_Types...>& _Left, tuple<_Types...>& _Right) noexce return _Left.swap(_Right); } -// CLASS _Tuple_element (find element by type) template struct _Tuple_element {}; // backstop _Tuple_element definition @@ -811,7 +797,6 @@ struct _Tuple_element<_Ty, tuple<_This, _Rest...>> { // recursive _Tuple_element using _Ttype = typename _Tuple_element<_Ty, tuple<_Rest...>>::_Ttype; }; -// FUNCTION TEMPLATE get (by index) template _NODISCARD constexpr tuple_element_t<_Index, tuple<_Types...>>& get(tuple<_Types...>& _Tuple) noexcept { using _Ttype = typename tuple_element<_Index, tuple<_Types...>>::_Ttype; @@ -846,7 +831,6 @@ _NODISCARD constexpr auto&& _Tuple_get(tuple<_Types...>&& _Tuple) noexcept { return static_cast<_Ty&&>(static_cast<_Ttype&>(_Tuple)._Myfirst._Val); } -// FUNCTION TEMPLATE get (by type) template _NODISCARD constexpr _Ty& get(tuple<_Types...>& _Tuple) noexcept { using _Ttype = typename _Tuple_element<_Ty, tuple<_Types...>>::_Ttype; @@ -871,7 +855,6 @@ _NODISCARD constexpr const _Ty&& get(const tuple<_Types...>&& _Tuple) noexcept { return static_cast(static_cast(_Tuple)._Myfirst._Val); } -// CONSTRUCTOR TEMPLATES FOR tuple template template , int>> constexpr tuple<_This, _Rest...>::tuple(_Tag, _Tpl&& _Right, index_sequence<_Indices...>) @@ -883,27 +866,23 @@ template ::tuple(_Tag, const _Alloc& _Al, _Tpl&& _Right, index_sequence<_Indices...>) : tuple(_Alloc_exact_args_t{}, _Al, _STD get<_Indices>(_STD forward<_Tpl>(_Right))...) {} -// FUNCTION TEMPLATE make_tuple template _NODISCARD constexpr tuple<_Unrefwrap_t<_Types>...> make_tuple(_Types&&... _Args) { // make tuple from elements using _Ttype = tuple<_Unrefwrap_t<_Types>...>; return _Ttype(_STD forward<_Types>(_Args)...); } -// FUNCTION TEMPLATE tie template _NODISCARD constexpr tuple<_Types&...> tie(_Types&... _Args) noexcept { // make tuple from elements using _Ttype = tuple<_Types&...>; return _Ttype(_Args...); } -// FUNCTION TEMPLATE forward_as_tuple template _NODISCARD constexpr tuple<_Types&&...> forward_as_tuple(_Types&&... _Args) noexcept { // forward arguments in a tuple return tuple<_Types&&...>(_STD forward<_Types>(_Args)...); } -// STRUCT TEMPLATE _Cat_sequences template struct _Cat_sequences; @@ -929,7 +908,6 @@ _NODISCARD constexpr _Ty&& get(array<_Ty, _Size>&& _Arr) noexcept; template _NODISCARD constexpr const _Ty&& get(const array<_Ty, _Size>&& _Arr) noexcept; -// STRUCT TEMPLATE _View_as_tuple template struct _View_as_tuple { // tuple_cat() supports only tuples, pairs, and arrays static_assert(_Always_false<_Ty>, "Unsupported tuple_cat arguments."); @@ -955,11 +933,9 @@ struct _View_as_tuple, _Types...> : _View_as_tuple, _Ty, _Types...> { // view an array as a tuple; counts down to 0 }; -// STRUCT TEMPLATE _Repeat_for template struct _Repeat_for : integral_constant {}; // repeats _Nx for each _Ty in a parameter pack -// FUNCTION TEMPLATE tuple_cat template struct _Tuple_cat2 { // determine tuple_cat's return type and _Kx/_Ix indices static_assert(sizeof...(_Tuples) == 0, "Unsupported tuple_cat arguments."); @@ -994,7 +970,6 @@ _NODISCARD constexpr typename _Tuple_cat1<_Tuples...>::type tuple_cat(_Tuples&&. } #if _HAS_CXX17 -// FUNCTION TEMPLATE apply template constexpr decltype(auto) _Apply_impl( _Callable&& _Obj, _Tuple&& _Tpl, index_sequence<_Indices...>) { // invoke _Obj with the elements of _Tpl @@ -1007,7 +982,6 @@ constexpr decltype(auto) apply(_Callable&& _Obj, _Tuple&& _Tpl) { // invoke _Obj make_index_sequence>>{}); } -// FUNCTION TEMPLATE make_from_tuple template constexpr _Ty _Make_from_tuple_impl( _Tuple&& _Tpl, index_sequence<_Indices...>) { // construct _Ty from the elements of _Tpl @@ -1021,7 +995,6 @@ _NODISCARD constexpr _Ty make_from_tuple(_Tuple&& _Tpl) { // construct _Ty from } #endif // _HAS_CXX17 -// STRUCT TEMPLATE uses_allocator template struct uses_allocator, _Alloc> : true_type {}; // true_type if container allocator enabled diff --git a/stl/inc/type_traits b/stl/inc/type_traits index 98b95870251..a4a7d1afcbf 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -19,7 +19,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// STRUCT TEMPLATE integer_sequence template struct integer_sequence { // sequence of integer parameters static_assert(is_integral_v<_Ty>, "integer_sequence requires T to be an integral type."); @@ -44,7 +43,6 @@ using make_index_sequence = make_integer_sequence; template using index_sequence_for = make_index_sequence; -// STRUCT TEMPLATE conjunction template struct _Conjunction { // handle false trait or last trait using type = _First; @@ -66,14 +64,12 @@ struct conjunction<_First, _Rest...> : _Conjunction<_First::value, _First, _Rest template _INLINE_VAR constexpr bool conjunction_v = conjunction<_Traits...>::value; -// STRUCT TEMPLATE negation template struct negation : bool_constant(_Trait::value)> {}; // The negated result of _Trait template _INLINE_VAR constexpr bool negation_v = negation<_Trait>::value; -// STRUCT TEMPLATE is_void template _INLINE_VAR constexpr bool is_void_v = is_same_v, void>; @@ -85,7 +81,6 @@ template using void_t = void; // Type modifiers -// STRUCT TEMPLATE add_const template struct add_const { // add top-level const qualifier using type = const _Ty; @@ -94,7 +89,6 @@ struct add_const { // add top-level const qualifier template using add_const_t = typename add_const<_Ty>::type; -// STRUCT TEMPLATE add_volatile template struct add_volatile { // add top-level volatile qualifier using type = volatile _Ty; @@ -103,7 +97,6 @@ struct add_volatile { // add top-level volatile qualifier template using add_volatile_t = typename add_volatile<_Ty>::type; -// STRUCT TEMPLATE add_cv template struct add_cv { // add top-level const and volatile qualifiers using type = const volatile _Ty; @@ -112,7 +105,6 @@ struct add_cv { // add top-level const and volatile qualifiers template using add_cv_t = typename add_cv<_Ty>::type; -// STRUCT TEMPLATE _Add_reference template struct _Add_reference { // add reference (non-referenceable type) using _Lvalue = _Ty; @@ -125,7 +117,6 @@ struct _Add_reference<_Ty, void_t<_Ty&>> { // (referenceable type) using _Rvalue = _Ty&&; }; -// STRUCT TEMPLATE add_lvalue_reference template struct add_lvalue_reference { using type = typename _Add_reference<_Ty>::_Lvalue; @@ -134,7 +125,6 @@ struct add_lvalue_reference { template using add_lvalue_reference_t = typename _Add_reference<_Ty>::_Lvalue; -// STRUCT TEMPLATE add_rvalue_reference template struct add_rvalue_reference { using type = typename _Add_reference<_Ty>::_Rvalue; @@ -143,11 +133,9 @@ struct add_rvalue_reference { template using add_rvalue_reference_t = typename _Add_reference<_Ty>::_Rvalue; -// FUNCTION TEMPLATE declval template add_rvalue_reference_t<_Ty> declval() noexcept; -// STRUCT TEMPLATE remove_extent template struct remove_extent { // remove array extent using type = _Ty; @@ -166,7 +154,6 @@ struct remove_extent<_Ty[]> { template using remove_extent_t = typename remove_extent<_Ty>::type; -// STRUCT TEMPLATE remove_all_extents template struct remove_all_extents { // remove all array extents using type = _Ty; @@ -185,7 +172,6 @@ struct remove_all_extents<_Ty[]> { template using remove_all_extents_t = typename remove_all_extents<_Ty>::type; -// STRUCT TEMPLATE remove_pointer template struct remove_pointer { using type = _Ty; @@ -214,7 +200,6 @@ struct remove_pointer<_Ty* const volatile> { template using remove_pointer_t = typename remove_pointer<_Ty>::type; -// STRUCT TEMPLATE add_pointer template struct _Add_pointer { // add pointer (pointer type cannot be formed) using type = _Ty; @@ -234,7 +219,6 @@ template using add_pointer_t = typename _Add_pointer<_Ty>::type; // TYPE PREDICATES -// STRUCT TEMPLATE is_array template _INLINE_VAR constexpr bool is_array_v = false; // determine whether type argument is an array @@ -248,7 +232,6 @@ template struct is_array : bool_constant> {}; #if _HAS_CXX20 -// STRUCT TEMPLATE is_bounded_array template inline constexpr bool is_bounded_array_v = false; @@ -258,7 +241,6 @@ inline constexpr bool is_bounded_array_v<_Ty[_Nx]> = true; template struct is_bounded_array : bool_constant> {}; -// STRUCT TEMPLATE is_unbounded_array template inline constexpr bool is_unbounded_array_v = false; @@ -269,7 +251,6 @@ template struct is_unbounded_array : bool_constant> {}; #endif // _HAS_CXX20 -// STRUCT TEMPLATE is_lvalue_reference template _INLINE_VAR constexpr bool is_lvalue_reference_v = false; // determine whether type argument is an lvalue reference @@ -279,7 +260,6 @@ _INLINE_VAR constexpr bool is_lvalue_reference_v<_Ty&> = true; template struct is_lvalue_reference : bool_constant> {}; -// STRUCT TEMPLATE is_rvalue_reference template _INLINE_VAR constexpr bool is_rvalue_reference_v = false; // determine whether type argument is an rvalue reference @@ -289,7 +269,6 @@ _INLINE_VAR constexpr bool is_rvalue_reference_v<_Ty&&> = true; template struct is_rvalue_reference : bool_constant> {}; -// STRUCT TEMPLATE is_reference template _INLINE_VAR constexpr bool is_reference_v = false; // determine whether type argument is a reference @@ -302,7 +281,6 @@ _INLINE_VAR constexpr bool is_reference_v<_Ty&&> = true; template struct is_reference : bool_constant> {}; -// STRUCT TEMPLATE is_pointer template _INLINE_VAR constexpr bool is_pointer_v = false; // determine whether _Ty is a pointer @@ -321,7 +299,6 @@ _INLINE_VAR constexpr bool is_pointer_v<_Ty* const volatile> = true; template struct is_pointer : bool_constant> {}; -// STRUCT TEMPLATE is_null_pointer template _INLINE_VAR constexpr bool is_null_pointer_v = is_same_v, nullptr_t>; // determine whether _Ty is cv-qualified nullptr_t @@ -329,28 +306,24 @@ _INLINE_VAR constexpr bool is_null_pointer_v = template struct is_null_pointer : bool_constant> {}; -// STRUCT TEMPLATE is_union template struct is_union : bool_constant<__is_union(_Ty)> {}; // determine whether _Ty is a union template _INLINE_VAR constexpr bool is_union_v = __is_union(_Ty); -// STRUCT TEMPLATE is_class template struct is_class : bool_constant<__is_class(_Ty)> {}; // determine whether _Ty is a class template _INLINE_VAR constexpr bool is_class_v = __is_class(_Ty); -// STRUCT TEMPLATE is_fundamental template _INLINE_VAR constexpr bool is_fundamental_v = is_arithmetic_v<_Ty> || is_void_v<_Ty> || is_null_pointer_v<_Ty>; template struct is_fundamental : bool_constant> {}; // determine whether _Ty is a fundamental type -// STRUCT TEMPLATE is_convertible template struct is_convertible : bool_constant<__is_convertible_to(_From, _To)> { // determine whether _From is convertible to _To @@ -359,7 +332,6 @@ struct is_convertible : bool_constant<__is_convertible_to(_From, _To)> { template _INLINE_VAR constexpr bool is_convertible_v = __is_convertible_to(_From, _To); -// STRUCT TEMPLATE is_enum template struct is_enum : bool_constant<__is_enum(_Ty)> {}; // determine whether _Ty is an enumerated type @@ -367,7 +339,6 @@ template _INLINE_VAR constexpr bool is_enum_v = __is_enum(_Ty); #if _HAS_CXX23 -// STRUCT TEMPLATE is_scoped_enum template inline constexpr bool is_scoped_enum_v = conjunction_v, negation>>; @@ -375,14 +346,12 @@ template struct is_scoped_enum : bool_constant> {}; #endif // _HAS_CXX23 -// STRUCT TEMPLATE is_compound template struct is_compound : bool_constant> {}; // determine whether _Ty is a compound type template _INLINE_VAR constexpr bool is_compound_v = !is_fundamental_v<_Ty>; -// STRUCT TEMPLATE _Arg_types template struct _Arg_types {}; // provide argument_type, etc. when sizeof...(_Types) is 1 or 2 @@ -397,7 +366,6 @@ struct _Arg_types<_Ty1, _Ty2> { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty2 _SECOND_ARGUMENT_TYPE_NAME; }; -// STRUCT TEMPLATE is_member_function_pointer template struct _Is_memfunptr { // base class for member function pointer predicates using _Bool_type = false_type; // NB: members are user-visible via _Weak_types @@ -440,7 +408,6 @@ _INLINE_VAR constexpr bool is_member_function_pointer_v = _Is_memfunptr struct is_member_function_pointer : bool_constant> {}; -// STRUCT TEMPLATE is_const template _INLINE_VAR constexpr bool is_const_v = false; // determine whether type argument is const qualified @@ -450,7 +417,6 @@ _INLINE_VAR constexpr bool is_const_v = true; template struct is_const : bool_constant> {}; -// STRUCT TEMPLATE is_volatile template _INLINE_VAR constexpr bool is_volatile_v = false; // determine whether type argument is volatile qualified @@ -460,7 +426,6 @@ _INLINE_VAR constexpr bool is_volatile_v = true; template struct is_volatile : bool_constant> {}; -// STRUCT TEMPLATE is_function template _INLINE_VAR constexpr bool is_function_v = // only function types and reference types can't be const qualified !is_const_v && !is_reference_v<_Ty>; @@ -468,7 +433,6 @@ _INLINE_VAR constexpr bool is_function_v = // only function types and reference template struct is_function : bool_constant> {}; -// STRUCT TEMPLATE is_object template _INLINE_VAR constexpr bool is_object_v = // only function types and reference types can't be const qualified is_const_v && !is_void_v<_Ty>; @@ -476,7 +440,6 @@ _INLINE_VAR constexpr bool is_object_v = // only function types and reference ty template struct is_object : bool_constant> {}; -// STRUCT TEMPLATE is_member_object_pointer template struct _Is_member_object_pointer { static constexpr bool value = false; @@ -499,7 +462,6 @@ _INLINE_VAR constexpr bool is_member_object_pointer_v = _Is_member_object_pointe template struct is_member_object_pointer : bool_constant> {}; -// STRUCT TEMPLATE is_member_pointer #ifdef __clang__ template _INLINE_VAR constexpr bool is_member_pointer_v = __is_member_pointer(_Ty); @@ -511,7 +473,6 @@ _INLINE_VAR constexpr bool is_member_pointer_v = is_member_object_pointer_v<_Ty> template struct is_member_pointer : bool_constant> {}; // determine whether _Ty is a pointer to member -// STRUCT TEMPLATE is_scalar template _INLINE_VAR constexpr bool is_scalar_v = // determine whether _Ty is a scalar type is_arithmetic_v<_Ty> || is_enum_v<_Ty> || is_pointer_v<_Ty> || is_member_pointer_v<_Ty> || is_null_pointer_v<_Ty>; @@ -519,42 +480,36 @@ _INLINE_VAR constexpr bool is_scalar_v = // determine whether _Ty is a scalar ty template struct is_scalar : bool_constant> {}; -// STRUCT TEMPLATE is_pod template struct _CXX20_DEPRECATE_IS_POD is_pod : bool_constant<__is_pod(_Ty)> {}; // determine whether _Ty is a POD type template _CXX20_DEPRECATE_IS_POD _INLINE_VAR constexpr bool is_pod_v = __is_pod(_Ty); -// STRUCT TEMPLATE is_empty template struct is_empty : bool_constant<__is_empty(_Ty)> {}; // determine whether _Ty is an empty class template _INLINE_VAR constexpr bool is_empty_v = __is_empty(_Ty); -// STRUCT TEMPLATE is_polymorphic template struct is_polymorphic : bool_constant<__is_polymorphic(_Ty)> {}; // determine whether _Ty is a polymorphic type template _INLINE_VAR constexpr bool is_polymorphic_v = __is_polymorphic(_Ty); -// STRUCT TEMPLATE is_abstract template struct is_abstract : bool_constant<__is_abstract(_Ty)> {}; // determine whether _Ty is an abstract class template _INLINE_VAR constexpr bool is_abstract_v = __is_abstract(_Ty); -// STRUCT TEMPLATE is_final template struct is_final : bool_constant<__is_final(_Ty)> {}; // determine whether _Ty is a final class template _INLINE_VAR constexpr bool is_final_v = __is_final(_Ty); -// STRUCT TEMPLATE is_standard_layout template struct is_standard_layout : bool_constant<__is_standard_layout(_Ty)> {}; // determine whether _Ty is standard layout @@ -562,7 +517,6 @@ template _INLINE_VAR constexpr bool is_standard_layout_v = __is_standard_layout(_Ty); #if _HAS_DEPRECATED_IS_LITERAL_TYPE -// STRUCT TEMPLATE is_literal_type template struct _CXX17_DEPRECATE_IS_LITERAL_TYPE is_literal_type : bool_constant<__is_literal_type(_Ty)> { // determine whether _Ty is a literal type @@ -572,7 +526,6 @@ template _CXX17_DEPRECATE_IS_LITERAL_TYPE _INLINE_VAR constexpr bool is_literal_type_v = __is_literal_type(_Ty); #endif // _HAS_DEPRECATED_IS_LITERAL_TYPE -// STRUCT TEMPLATE is_trivial #if 1 // TRANSITION, VSO-119526 and LLVM-41915 template struct is_trivial : bool_constant<__is_trivially_constructible(_Ty) && __is_trivially_copyable(_Ty)> { @@ -589,7 +542,6 @@ template _INLINE_VAR constexpr bool is_trivial_v = __is_trivial(_Ty); #endif // TRANSITION -// STRUCT TEMPLATE is_trivially_copyable template struct is_trivially_copyable : bool_constant<__is_trivially_copyable(_Ty)> { // determine whether _Ty is a trivially copyable type @@ -598,7 +550,6 @@ struct is_trivially_copyable : bool_constant<__is_trivially_copyable(_Ty)> { template _INLINE_VAR constexpr bool is_trivially_copyable_v = __is_trivially_copyable(_Ty); -// STRUCT TEMPLATE has_virtual_destructor template struct has_virtual_destructor : bool_constant<__has_virtual_destructor(_Ty)> { // determine whether _Ty has a virtual destructor @@ -608,7 +559,6 @@ template _INLINE_VAR constexpr bool has_virtual_destructor_v = __has_virtual_destructor(_Ty); #if _HAS_CXX17 -// STRUCT TEMPLATE has_unique_object_representations template struct has_unique_object_representations : bool_constant<__has_unique_object_representations(_Ty)> { // determine whether _Ty has unique object representations @@ -617,7 +567,6 @@ struct has_unique_object_representations : bool_constant<__has_unique_object_rep template _INLINE_VAR constexpr bool has_unique_object_representations_v = __has_unique_object_representations(_Ty); -// STRUCT TEMPLATE is_aggregate template struct is_aggregate : bool_constant<__is_aggregate(_Ty)> {}; // determine whether _Ty is an aggregate @@ -625,8 +574,6 @@ template _INLINE_VAR constexpr bool is_aggregate_v = __is_aggregate(_Ty); #endif // _HAS_CXX17 -// CONSTRUCTIBLE/ASSIGNABLE TRAITS -// STRUCT TEMPLATE is_constructible template struct is_constructible : bool_constant<__is_constructible(_Ty, _Args...)> { // determine whether _Ty can be direct-initialized with _Args... @@ -635,7 +582,6 @@ struct is_constructible : bool_constant<__is_constructible(_Ty, _Args...)> { template _INLINE_VAR constexpr bool is_constructible_v = __is_constructible(_Ty, _Args...); -// STRUCT TEMPLATE is_copy_constructible template struct is_copy_constructible : bool_constant<__is_constructible(_Ty, add_lvalue_reference_t)> { // determine whether _Ty can be direct-initialized with an lvalue const _Ty @@ -644,7 +590,6 @@ struct is_copy_constructible : bool_constant<__is_constructible(_Ty, add_lvalue_ template _INLINE_VAR constexpr bool is_copy_constructible_v = __is_constructible(_Ty, add_lvalue_reference_t); -// STRUCT TEMPLATE is_default_constructible template struct is_default_constructible : bool_constant<__is_constructible(_Ty)> { // determine whether _Ty can be value-initialized @@ -653,7 +598,6 @@ struct is_default_constructible : bool_constant<__is_constructible(_Ty)> { template _INLINE_VAR constexpr bool is_default_constructible_v = __is_constructible(_Ty); -// STRUCT TEMPLATE _Is_implicitly_default_constructible template struct _Is_implicitly_default_constructible : false_type { // determine whether _Ty can be copy-initialized with {} @@ -666,7 +610,6 @@ template struct _Is_implicitly_default_constructible<_Ty, void_t({}))>> : true_type { }; -// STRUCT TEMPLATE is_move_constructible template struct is_move_constructible : bool_constant<__is_constructible(_Ty, _Ty)> { // determine whether _Ty can be direct-initialized from an rvalue _Ty @@ -675,14 +618,12 @@ struct is_move_constructible : bool_constant<__is_constructible(_Ty, _Ty)> { template _INLINE_VAR constexpr bool is_move_constructible_v = __is_constructible(_Ty, _Ty); -// STRUCT TEMPLATE is_assignable template struct is_assignable : bool_constant<__is_assignable(_To, _From)> {}; // determine whether _From can be assigned to _To template _INLINE_VAR constexpr bool is_assignable_v = __is_assignable(_To, _From); -// STRUCT TEMPLATE is_copy_assignable template struct is_copy_assignable : bool_constant<__is_assignable(add_lvalue_reference_t<_Ty>, add_lvalue_reference_t)> { @@ -710,7 +651,6 @@ template _INLINE_VAR constexpr bool _Is_copy_assignable_unchecked_v = is_copy_assignable_v<_Ty>; #endif // defined(_IS_ASSIGNABLE_NOCHECK_SUPPORTED) && !defined(__CUDACC__) -// STRUCT TEMPLATE is_move_assignable template struct is_move_assignable : bool_constant<__is_assignable(add_lvalue_reference_t<_Ty>, _Ty)> { // determine whether an rvalue _Ty can be assigned to an lvalue _Ty @@ -735,7 +675,6 @@ template _INLINE_VAR constexpr bool _Is_move_assignable_unchecked_v = is_move_assignable_v<_Ty>; #endif // defined(_IS_ASSIGNABLE_NOCHECK_SUPPORTED) && !defined(__CUDACC__) -// STRUCT TEMPLATE is_destructible template struct is_destructible : bool_constant<__is_destructible(_Ty)> { // true iff remove_all_extents_t<_Ty> is a reference type, or can be explicitly destroyed @@ -745,7 +684,6 @@ template _INLINE_VAR constexpr bool is_destructible_v = __is_destructible(_Ty); // TRIVIAL TRAITS -// STRUCT TEMPLATE is_trivially_constructible template struct is_trivially_constructible : bool_constant<__is_trivially_constructible(_Ty, _Args...)> { // determine whether direct-initialization of _Ty with _Args... is trivial @@ -754,7 +692,6 @@ struct is_trivially_constructible : bool_constant<__is_trivially_constructible(_ template _INLINE_VAR constexpr bool is_trivially_constructible_v = __is_trivially_constructible(_Ty, _Args...); -// STRUCT TEMPLATE is_trivially_copy_constructible template struct is_trivially_copy_constructible : bool_constant<__is_trivially_constructible(_Ty, add_lvalue_reference_t)> { @@ -765,7 +702,6 @@ template _INLINE_VAR constexpr bool is_trivially_copy_constructible_v = __is_trivially_constructible( _Ty, add_lvalue_reference_t); -// STRUCT TEMPLATE is_trivially_default_constructible template struct is_trivially_default_constructible : bool_constant<__is_trivially_constructible(_Ty)> { // determine whether value-initialization of _Ty is trivial @@ -774,7 +710,6 @@ struct is_trivially_default_constructible : bool_constant<__is_trivially_constru template _INLINE_VAR constexpr bool is_trivially_default_constructible_v = __is_trivially_constructible(_Ty); -// STRUCT TEMPLATE is_trivially_move_constructible template struct is_trivially_move_constructible : bool_constant<__is_trivially_constructible(_Ty, _Ty)> { // determine whether direct-initialization of _Ty with an rvalue _Ty is trivial @@ -783,7 +718,6 @@ struct is_trivially_move_constructible : bool_constant<__is_trivially_constructi template _INLINE_VAR constexpr bool is_trivially_move_constructible_v = __is_trivially_constructible(_Ty, _Ty); -// STRUCT TEMPLATE is_trivially_assignable template struct is_trivially_assignable : bool_constant<__is_trivially_assignable(_To, _From)> { // determine whether _From can be trivially assigned to _To @@ -792,7 +726,6 @@ struct is_trivially_assignable : bool_constant<__is_trivially_assignable(_To, _F template _INLINE_VAR constexpr bool is_trivially_assignable_v = __is_trivially_assignable(_To, _From); -// STRUCT TEMPLATE is_trivially_copy_assignable template struct is_trivially_copy_assignable : bool_constant<__is_trivially_assignable(add_lvalue_reference_t<_Ty>, add_lvalue_reference_t)> { @@ -803,7 +736,6 @@ template _INLINE_VAR constexpr bool is_trivially_copy_assignable_v = __is_trivially_assignable( add_lvalue_reference_t<_Ty>, add_lvalue_reference_t); -// STRUCT TEMPLATE is_trivially_move_assignable template struct is_trivially_move_assignable : bool_constant<__is_trivially_assignable(add_lvalue_reference_t<_Ty>, _Ty)> { // determine whether an rvalue _Ty can be trivially assigned to an lvalue _Ty @@ -812,7 +744,6 @@ struct is_trivially_move_assignable : bool_constant<__is_trivially_assignable(ad template _INLINE_VAR constexpr bool is_trivially_move_assignable_v = __is_trivially_assignable(add_lvalue_reference_t<_Ty>, _Ty); -// STRUCT TEMPLATE is_trivially_destructible template struct is_trivially_destructible : bool_constant<__is_trivially_destructible(_Ty)> { // determine whether remove_all_extents_t<_Ty> is a reference type or can trivially be explicitly destroyed @@ -822,7 +753,6 @@ template _INLINE_VAR constexpr bool is_trivially_destructible_v = __is_trivially_destructible(_Ty); // NOTHROW TRAITS -// STRUCT TEMPLATE is_nothrow_constructible template struct is_nothrow_constructible : bool_constant<__is_nothrow_constructible(_Ty, _Args...)> { // determine whether direct-initialization of _Ty from _Args... is both valid and not potentially-throwing @@ -831,7 +761,6 @@ struct is_nothrow_constructible : bool_constant<__is_nothrow_constructible(_Ty, template _INLINE_VAR constexpr bool is_nothrow_constructible_v = __is_nothrow_constructible(_Ty, _Args...); -// STRUCT TEMPLATE is_nothrow_copy_constructible template struct is_nothrow_copy_constructible : bool_constant<__is_nothrow_constructible(_Ty, add_lvalue_reference_t)> { @@ -843,7 +772,6 @@ template _INLINE_VAR constexpr bool is_nothrow_copy_constructible_v = __is_nothrow_constructible( _Ty, add_lvalue_reference_t); -// STRUCT TEMPLATE is_nothrow_default_constructible template struct is_nothrow_default_constructible : bool_constant<__is_nothrow_constructible(_Ty)> { // determine whether value-initialization of _Ty is both valid and not potentially-throwing @@ -852,7 +780,6 @@ struct is_nothrow_default_constructible : bool_constant<__is_nothrow_constructib template _INLINE_VAR constexpr bool is_nothrow_default_constructible_v = __is_nothrow_constructible(_Ty); -// STRUCT TEMPLATE is_nothrow_move_constructible template struct is_nothrow_move_constructible : bool_constant<__is_nothrow_constructible(_Ty, _Ty)> { // determine whether direct-initialization of _Ty from an rvalue _Ty is both valid and not potentially-throwing @@ -861,7 +788,6 @@ struct is_nothrow_move_constructible : bool_constant<__is_nothrow_constructible( template _INLINE_VAR constexpr bool is_nothrow_move_constructible_v = __is_nothrow_constructible(_Ty, _Ty); -// STRUCT TEMPLATE is_nothrow_assignable template struct is_nothrow_assignable : bool_constant<__is_nothrow_assignable(_To, _From)> { // determine whether assignment of _From to _To is both valid and not potentially-throwing @@ -870,7 +796,6 @@ struct is_nothrow_assignable : bool_constant<__is_nothrow_assignable(_To, _From) template _INLINE_VAR constexpr bool is_nothrow_assignable_v = __is_nothrow_assignable(_To, _From); -// STRUCT TEMPLATE is_nothrow_copy_assignable template struct is_nothrow_copy_assignable : bool_constant<__is_nothrow_assignable(add_lvalue_reference_t<_Ty>, add_lvalue_reference_t)> { @@ -881,7 +806,6 @@ template _INLINE_VAR constexpr bool is_nothrow_copy_assignable_v = __is_nothrow_assignable( add_lvalue_reference_t<_Ty>, add_lvalue_reference_t); -// STRUCT TEMPLATE is_nothrow_move_assignable template struct is_nothrow_move_assignable : bool_constant<__is_nothrow_assignable(add_lvalue_reference_t<_Ty>, _Ty)> { // determine whether assignment of an rvalue _Ty to an lvalue _Ty is both valid and not potentially-throwing @@ -890,7 +814,6 @@ struct is_nothrow_move_assignable : bool_constant<__is_nothrow_assignable(add_lv template _INLINE_VAR constexpr bool is_nothrow_move_assignable_v = __is_nothrow_assignable(add_lvalue_reference_t<_Ty>, _Ty); -// STRUCT TEMPLATE is_nothrow_destructible template struct is_nothrow_destructible : bool_constant<__is_nothrow_destructible(_Ty)> { // determine whether remove_all_extents_t<_Ty> is a reference type or has @@ -900,7 +823,6 @@ struct is_nothrow_destructible : bool_constant<__is_nothrow_destructible(_Ty)> { template _INLINE_VAR constexpr bool is_nothrow_destructible_v = __is_nothrow_destructible(_Ty); -// STRUCT TEMPLATE is_signed template > struct _Sign_base { // determine whether integral type _Ty is signed or unsigned using _Uty = remove_cv_t<_Ty>; @@ -922,18 +844,15 @@ struct is_signed : bool_constant<_Sign_base<_Ty>::_Signed> {}; // determine whet template _INLINE_VAR constexpr bool is_signed_v = _Sign_base<_Ty>::_Signed; -// STRUCT TEMPLATE is_unsigned template struct is_unsigned : bool_constant<_Sign_base<_Ty>::_Unsigned> {}; // determine whether _Ty is an unsigned type template _INLINE_VAR constexpr bool is_unsigned_v = _Sign_base<_Ty>::_Unsigned; -// VARIABLE TEMPLATE _Is_nonbool_integral template _INLINE_VAR constexpr bool _Is_nonbool_integral = is_integral_v<_Ty> && !is_same_v, bool>; -// STRUCT TEMPLATE make_signed template struct _Select { // Select between aliases that extract either their first or second parameter template @@ -990,7 +909,6 @@ struct make_signed { // signed partner to _Ty template using make_signed_t = typename make_signed<_Ty>::type; -// STRUCT TEMPLATE make_unsigned template struct _Make_unsigned2; // Choose make_unsigned strategy by type size @@ -1036,20 +954,17 @@ struct make_unsigned { // unsigned partner to _Ty template using make_unsigned_t = typename make_unsigned<_Ty>::type; -// FUNCTION TEMPLATE _Unsigned_value template constexpr make_unsigned_t<_Rep> _Unsigned_value(_Rep _Val) { // makes _Val unsigned return static_cast>(_Val); } -// STRUCT TEMPLATE alignment_of template struct alignment_of : integral_constant {}; // determine alignment of _Ty template _INLINE_VAR constexpr size_t alignment_of_v = alignof(_Ty); -// STRUCT TEMPLATE aligned_storage template union _Align_type { // union with size _Len bytes and alignment of _Ty _Ty _Val; @@ -1119,7 +1034,6 @@ struct aligned_storage { // define type with size _Len and alignment _Align template using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; -// STRUCT TEMPLATE aligned_union template struct _Maximum; @@ -1145,7 +1059,6 @@ struct aligned_union { // define type with size at least _Len, for storing anyth template using aligned_union_t = typename aligned_union<_Len, _Types...>::type; -// STRUCT TEMPLATE underlying_type template > struct _Underlying_type { using type = __underlying_type(_Ty); @@ -1160,7 +1073,6 @@ struct underlying_type : _Underlying_type<_Ty> {}; // determine underlying type template using underlying_type_t = typename _Underlying_type<_Ty>::type; -// STRUCT TEMPLATE rank template _INLINE_VAR constexpr size_t rank_v = 0; // determine number of dimensions of array _Ty @@ -1173,7 +1085,6 @@ _INLINE_VAR constexpr size_t rank_v<_Ty[]> = rank_v<_Ty> + 1; template struct rank : integral_constant> {}; -// STRUCT TEMPLATE extent template _INLINE_VAR constexpr size_t extent_v = 0; // determine extent of dimension _Ix of array _Ty @@ -1189,7 +1100,6 @@ _INLINE_VAR constexpr size_t extent_v<_Ty[], _Ix> = extent_v<_Ty, _Ix - 1>; template struct extent : integral_constant> {}; -// STRUCT TEMPLATE is_base_of template struct is_base_of : bool_constant<__is_base_of(_Base, _Derived)> { // determine whether _Base is a base of or the same as _Derived @@ -1198,7 +1108,6 @@ struct is_base_of : bool_constant<__is_base_of(_Base, _Derived)> { template _INLINE_VAR constexpr bool is_base_of_v = __is_base_of(_Base, _Derived); -// STRUCT TEMPLATE decay template struct decay { // determines decayed version of _Ty using _Ty1 = remove_reference_t<_Ty>; @@ -1213,7 +1122,6 @@ using decay_t = typename decay<_Ty>::type; template using _Conditional_type = decltype(false ? _STD declval<_Ty1>() : _STD declval<_Ty2>()); -// STRUCT TEMPLATE common_type #if _HAS_CXX20 template struct _Const_lvalue_cond_oper {}; @@ -1269,11 +1177,9 @@ template struct common_type<_Ty1, _Ty2, _Rest...> : _Common_type3 {}; #if _HAS_CXX20 -// STRUCT TEMPLATE basic_common_reference template class, template class> struct basic_common_reference {}; -// FUNCTION TEMPLATE _Returns_exactly template _Ty _Returns_exactly() noexcept; // not defined @@ -1307,7 +1213,6 @@ template using _Copy_cv = // N4810 [meta.trans.other]/2.3 typename _Copy_cv_impl<_From>::template _Apply<_To>; -// STRUCT TEMPLATE _Add_qualifiers template struct _Add_qualifiers { // _Add_qualifiers::template _Apply is XREF(A) from N4810 [meta.trans.other]/2.1 template @@ -1324,7 +1229,6 @@ struct _Add_qualifiers<_Ty1&&> { using _Apply = add_rvalue_reference_t<_Copy_cv<_Ty1, _Ty2>>; }; -// STRUCT TEMPLATE common_reference template struct common_reference; @@ -1415,7 +1319,6 @@ template struct common_reference<_Ty1, _Ty2, _Ty3, _Rest...> : _Fold_common_reference {}; #endif // _HAS_CXX20 -// STRUCT TEMPLATE _Identity template struct _Identity { using type = _Ty; @@ -1424,7 +1327,6 @@ template using _Identity_t = typename _Identity<_Ty>::type; #if _HAS_CXX20 -// STRUCT TEMPLATE type_identity template struct type_identity { using type = _Ty; @@ -1433,7 +1335,6 @@ template using type_identity_t = typename type_identity<_Ty>::type; #endif // _HAS_CXX20 -// STRUCT TEMPLATE _Is_specialization template class _Template> _INLINE_VAR constexpr bool _Is_specialization_v = false; // true if and only if _Type is a specialization of _Template template