From f6cc8bd30c1cde5445b84393a4fac8fb1d4c732d Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 22 Jul 2021 10:44:16 +0100 Subject: [PATCH 01/29] Remove CLASS --- stl/inc/any | 2 - stl/inc/array | 3 - stl/inc/bitset | 2 - stl/inc/chrono | 11 -- stl/inc/codecvt | 3 - stl/inc/compare | 3 - stl/inc/complex | 9 -- stl/inc/cvt/ebcdic | 1 - stl/inc/cvt/euc_0208 | 3 +- stl/inc/cvt/jis_0208 | 1 - stl/inc/cvt/one_one | 1 - stl/inc/cvt/sjis_0208 | 1 - stl/inc/cvt/utf16 | 1 - stl/inc/cvt/utf8 | 1 - stl/inc/cvt/utf8_utf16 | 1 - stl/inc/cvt/wbuffer | 1 - stl/inc/cvt/wstring | 1 - stl/inc/cvt/xjis | 1 - stl/inc/cvt/xone_byte | 1 - stl/inc/cvt/xtwo_byte | 1 - stl/inc/deque | 6 -- stl/inc/exception | 4 - stl/inc/execution | 2 - stl/inc/experimental/filesystem | 7 -- stl/inc/filesystem | 7 -- stl/inc/forward_list | 6 -- stl/inc/fstream | 4 - stl/inc/functional | 26 ----- stl/inc/future | 11 -- stl/inc/hash_map | 3 - stl/inc/hash_set | 3 - stl/inc/initializer_list | 1 - stl/inc/ios | 1 - stl/inc/iosfwd | 1 - stl/inc/iostream | 1 - stl/inc/istream | 3 - stl/inc/iterator | 12 --- stl/inc/limits | 20 ---- stl/inc/list | 6 -- stl/inc/locale | 2 - stl/inc/map | 3 - stl/inc/memory | 21 ---- stl/inc/memory_resource | 2 - stl/inc/mutex | 3 - stl/inc/optional | 2 - stl/inc/ostream | 1 - stl/inc/queue | 2 - stl/inc/random | 38 ------- stl/inc/ranges | 18 ---- stl/inc/regex | 28 ----- stl/inc/scoped_allocator | 2 - stl/inc/set | 173 +++++++++++++++---------------- stl/inc/shared_mutex | 3 - stl/inc/span | 1 - stl/inc/sstream | 4 - stl/inc/stack | 1 - stl/inc/stdexcept | 9 -- stl/inc/streambuf | 1 - stl/inc/strstream | 4 - stl/inc/syncstream | 3 - stl/inc/system_error | 4 - stl/inc/tuple | 2 - stl/inc/type_traits | 1 - stl/inc/typeinfo | 2 - stl/inc/unordered_map | 3 - stl/inc/unordered_set | 3 - stl/inc/valarray | 7 -- stl/inc/variant | 2 - stl/inc/vector | 11 -- stl/inc/xfacet | 1 - stl/inc/xhash | 4 - stl/inc/xiosbase | 4 - stl/inc/xlocale | 18 ---- stl/inc/xlocbuf | 2 - stl/inc/xlocinfo | 3 - stl/inc/xlocmes | 2 - stl/inc/xlocmon | 5 - stl/inc/xlocnum | 4 - stl/inc/xloctime | 6 -- stl/inc/xmemory | 5 - stl/inc/xnode_handle.h | 1 - stl/inc/xpolymorphic_allocator.h | 2 - stl/inc/xstring | 6 -- stl/inc/xtree | 6 -- stl/inc/xutility | 11 +- stl/inc/yvals.h | 1 - stl/src/locale.cpp | 1 - stl/src/locale0.cpp | 1 - stl/src/wlocale.cpp | 1 - stl/src/xlocale.cpp | 1 - 90 files changed, 86 insertions(+), 527 deletions(-) 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..06c72ec6add 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: diff --git a/stl/inc/bitset b/stl/inc/bitset index e8e74b7317c..05e1fa62cd8 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>; diff --git a/stl/inc/chrono b/stl/inc/chrono index 1a01e1b28d7..547d40f6cda 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -91,7 +91,6 @@ namespace chrono { inline constexpr bool is_clock_v = _Is_clock_v<_Clock>; #endif // _HAS_CXX20 - // CLASS TEMPLATE duration template > class duration; @@ -2269,7 +2268,6 @@ namespace chrono { sys_info second; }; - // CLASS nonexistent_local_time class nonexistent_local_time : public runtime_error { public: template @@ -2288,7 +2286,6 @@ namespace chrono { #endif // ^^^ workaround ^^^ }; - // CLASS ambiguous_local_time class ambiguous_local_time : public runtime_error { public: template @@ -2312,7 +2309,6 @@ namespace chrono { // 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 +2472,6 @@ namespace chrono { // [time.zone.leap] - // CLASS leap_second class leap_second { public: leap_second(const leap_second&) = default; @@ -2570,7 +2565,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_) {} @@ -2757,7 +2751,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>; @@ -2957,7 +2950,6 @@ namespace chrono { // [time.zone.zonedtime] - // CLASS TEMPLATE zoned_time template class zoned_time { private: @@ -3220,7 +3212,6 @@ namespace chrono { } } - // CLASS utc_clock class utc_clock { public: using rep = system_clock::rep; @@ -3271,7 +3262,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 +3297,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; 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..eb2afb42945 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; diff --git a/stl/inc/complex b/stl/inc/complex index bf222aead8c..c298990a344 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: @@ -925,7 +921,6 @@ struct _Complex_value { _Ty _Val[2]; }; -// CLASS TEMPLATE _Complex_base template class _Complex_base : public _Valbase { public: @@ -1015,7 +1010,6 @@ protected: } }; -// CLASS complex template <> class complex : public _Complex_base { public: @@ -1107,7 +1101,6 @@ public: } }; -// CLASS complex template <> class complex : public _Complex_base { public: @@ -1199,7 +1192,6 @@ public: } }; -// CLASS complex template <> class complex : public _Complex_base { public: @@ -1310,7 +1302,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: 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..361c6461b76 100644 --- a/stl/inc/cvt/euc_0208 +++ b/stl/inc/cvt/euc_0208 @@ -22,8 +22,7 @@ namespace stdext { namespace cvt { using _Statype = _CSTD mbstate_t; - // CLASS TEMPLATE codecvt_euc_0208 - template + template class codecvt_euc_0208 : public _STD codecvt<_Elem, char, _Statype> { // facet for converting between JIS-X0208 _Elem and EUC bytes public: 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..00e4d248869 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 @@ -321,7 +318,6 @@ _NODISCARD exception_ptr make_exception_ptr(_Ex _Except) noexcept { _THROW(bad_array_new_length{}); } -// CLASS nested_exception class nested_exception { // wrap an exception_ptr public: nested_exception() noexcept : _Exc(_STD current_exception()) {} diff --git a/stl/inc/execution b/stl/inc/execution index 5ee5c6b987b..ee4d409bbf5 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -181,7 +181,6 @@ struct _Cancellation_token { } }; -// CLASS _Work_ptr class _Work_ptr { public: template , _Work_ptr>, int> = 0> @@ -488,7 +487,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"); diff --git a/stl/inc/experimental/filesystem b/stl/inc/experimental/filesystem index caea6224a2d..0d5aa33aef0 100644 --- a/stl/inc/experimental/filesystem +++ b/stl/inc/experimental/filesystem @@ -127,7 +127,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 @@ -571,8 +570,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: using path_type = _Path_type; @@ -731,7 +728,6 @@ private: size_t _Myoff; // current offset in full path }; -// CLASS path AND FRIENDS class path { // stores a pathname public: using value_type = _Pchar; @@ -1323,7 +1319,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 +1371,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 +1619,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/filesystem b/stl/inc/filesystem index 3c91851c797..4a432e8b56b 100644 --- a/stl/inc/filesystem +++ b/stl/inc/filesystem @@ -674,7 +674,6 @@ namespace filesystem { } }; - // CLASS path template class _Path_iterator; @@ -1451,7 +1450,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 +1788,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) @@ -1949,7 +1946,6 @@ namespace filesystem { _BITMASK_OPS(copy_options) - // CLASS file_status class file_status { public: // [fs.file_status.cons], constructors and destructor @@ -2130,7 +2126,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 @@ -2656,7 +2651,6 @@ namespace filesystem { directory_entry _Entry; }; - // CLASS directory_iterator class directory_iterator { public: using iterator_category = input_iterator_tag; @@ -2875,7 +2869,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; 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..7b7f2a8098a 100644 --- a/stl/inc/fstream +++ b/stl/inc/fstream @@ -164,7 +164,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 +805,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 +989,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 +1172,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..a101f982e8c 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -319,7 +319,6 @@ struct bit_not { #if _HAS_DEPRECATED_NEGATORS _STL_DISABLE_DEPRECATED_WARNING -// CLASS TEMPLATE unary_negate template class _CXX17_DEPRECATE_NEGATORS unary_negate { public: @@ -342,7 +341,6 @@ _CXX17_DEPRECATE_NEGATORS _NODISCARD constexpr unary_negate<_Fn> not1(const _Fn& return unary_negate<_Fn>(_Func); } -// CLASS TEMPLATE binary_negate template class _CXX17_DEPRECATE_NEGATORS binary_negate { public: @@ -370,7 +368,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) @@ -401,7 +398,6 @@ _NODISCARD binder1st<_Fn> bind1st(const _Fn& _Func, const _Ty& _Left) { return binder1st<_Fn>(_Func, _Val); } -// CLASS TEMPLATE binder2nd template class binder2nd : public unary_function { // functor adapter _Func(left, stored) @@ -433,7 +429,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 +442,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) @@ -478,7 +472,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 +485,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 +498,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 +511,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 @@ -556,7 +546,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 +559,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 +573,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 +586,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 @@ -717,7 +703,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 {} @@ -781,7 +766,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 +798,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 +867,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 +930,6 @@ private: #define _USE_FUNCTION_INT_0_SFINAE 1 #endif // __CUDACC__ -// CLASS TEMPLATE _Func_class template class _Func_class : public _Arg_types<_Types...> { public: @@ -1119,7 +1100,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: @@ -1322,7 +1302,6 @@ 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; @@ -1414,7 +1393,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; @@ -1509,7 +1487,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: @@ -1633,7 +1610,6 @@ struct _Global_delete { } }; -// 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) { @@ -2133,7 +2109,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 +2148,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: diff --git a/stl/inc/future b/stl/inc/future index b14aa5b44fe..10ada2b9ae8 100644 --- a/stl/inc/future +++ b/stl/inc/future @@ -103,7 +103,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: @@ -193,7 +192,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 +449,6 @@ void _State_deleter<_Ty, _Derived, _Alloc>::_Delete( _Delete_plain_internal(_Del_alloc, this); } -// CLASS TEMPLATE _Packaged_state template class _Packaged_state; @@ -648,7 +645,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 +668,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 +702,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 +861,6 @@ private: bool _Get_only_once; }; -// CLASS TEMPLATE future template class shared_future; @@ -971,7 +964,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 +1067,6 @@ _NODISCARD inline shared_future future::share() noexcept { return shared_future(_STD move(*this)); } -// CLASS TEMPLATE _Promise template class _Promise { public: @@ -1144,7 +1135,6 @@ private: bool _Future_retrieved; }; -// CLASS TEMPLATE promise template class promise { // class that defines an asynchronous provider that holds a value public: @@ -1326,7 +1316,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; 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..11a4be24c90 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: 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..173772a216c 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: @@ -72,7 +71,6 @@ _NODISCARD _CONSTEXPR20 back_insert_iterator<_Container> back_inserter(_Containe 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: @@ -124,7 +122,6 @@ _NODISCARD _CONSTEXPR20 front_insert_iterator<_Container> front_inserter(_Contai return front_insert_iterator<_Container>(_Cont); } -// CLASS TEMPLATE insert_iterator template class insert_iterator { // wrap inserts into container as output iterator public: @@ -182,7 +179,6 @@ _NODISCARD _CONSTEXPR20 insert_iterator<_Container> inserter(_Container& _Cont, } #ifdef __cpp_lib_concepts -// CLASS TEMPLATE move_sentinel template class move_sentinel { public: @@ -220,7 +216,6 @@ private: }; #endif // __cpp_lib_concepts -// CLASS TEMPLATE istream_iterator template , class _Diff = ptrdiff_t> class istream_iterator { public: @@ -305,7 +300,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 +345,6 @@ private: ostream_type* _Myostr; // pointer to output stream }; -// CLASS TEMPLATE istreambuf_iterator template class istreambuf_iterator { public: @@ -489,7 +482,6 @@ _NODISCARD bool operator!=( } #endif // !_HAS_CXX20 -// CLASS TEMPLATE ostreambuf_iterator template class ostreambuf_iterator { public: @@ -541,7 +533,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 +1030,6 @@ struct iterator_traits> { using reference = iter_reference_t<_Iter>; }; -// CLASS TEMPLATE counted_iterator template struct _Counted_iterator_value_type_base {}; @@ -1372,7 +1362,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 +1564,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..2b0a7caf089 100644 --- a/stl/inc/limits +++ b/stl/inc/limits @@ -66,7 +66,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: @@ -139,7 +138,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 +180,6 @@ public: static constexpr int digits = 1; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -228,7 +225,6 @@ public: static constexpr int digits10 = 2; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -273,7 +269,6 @@ public: static constexpr int digits10 = 2; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -319,7 +314,6 @@ public: }; #ifdef __cpp_char8_t -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -365,7 +359,6 @@ public: }; #endif // __cpp_char8_t -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -410,7 +403,6 @@ public: static constexpr int digits10 = 4; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -455,7 +447,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -500,7 +491,6 @@ public: static constexpr int digits10 = 4; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -545,7 +535,6 @@ public: static constexpr int digits10 = 4; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -590,7 +579,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -636,7 +624,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -682,7 +669,6 @@ public: }; #ifdef _NATIVE_WCHAR_T_DEFINED -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -728,7 +714,6 @@ public: }; #endif // _NATIVE_WCHAR_T_DEFINED -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -773,7 +758,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -819,7 +803,6 @@ public: static constexpr int digits10 = 9; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_int_base { public: @@ -864,7 +847,6 @@ public: static constexpr int digits10 = 19; }; -// CLASS numeric_limits template <> class numeric_limits : public _Num_float_base { public: @@ -913,7 +895,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 +943,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..beb9b1368f5 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: @@ -758,7 +753,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..20667f1f9ff 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: 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..16569d8e6ca 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -899,7 +899,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 +946,6 @@ private: #if _HAS_AUTO_PTR_ETC -// CLASS TEMPLATE auto_ptr template class auto_ptr; @@ -1057,7 +1055,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 +1069,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 +1146,6 @@ public: } }; -// CLASS TEMPLATE _Ref_count template class _Ref_count : public _Ref_count_base { // handle reference counting for pointer without deleter public: @@ -1168,7 +1163,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 +1199,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 +1263,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 +1487,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 +2029,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 +2278,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 +2372,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 +2410,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 +2449,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 +2625,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 +2692,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 { @@ -2997,7 +2981,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 +3070,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,7 +3112,6 @@ private: }; -// CLASS TEMPLATE unique_ptr AND HELPERS // STRUCT TEMPLATE default_delete template @@ -3175,7 +3156,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 +3281,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: diff --git a/stl/inc/memory_resource b/stl/inc/memory_resource index 386122fabb9..8ef6b98b34c 100644 --- a/stl/inc/memory_resource +++ b/stl/inc/memory_resource @@ -105,7 +105,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 +596,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..bf70adeb6e7 100644 --- a/stl/inc/mutex +++ b/stl/inc/mutex @@ -123,7 +123,6 @@ _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: @@ -428,7 +427,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 +450,6 @@ private: }; #if _HAS_CXX17 -// CLASS TEMPLATE scoped_lock template class _NODISCARD scoped_lock { // class with destructor that unlocks mutexes public: diff --git a/stl/inc/optional b/stl/inc/optional index e007eb5d3fc..a7922c238b9 100644 --- a/stl/inc/optional +++ b/stl/inc/optional @@ -37,7 +37,6 @@ struct nullopt_t { // no-value state indicator }; 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 +151,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: 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..f3b8d869b0b 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; @@ -272,7 +271,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 +460,6 @@ private: result_type _Prev; }; -// CLASS TEMPLATE linear_congruential template class linear_congruential { // linear congruential random engine public: @@ -555,7 +552,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 +608,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: @@ -838,7 +833,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 +851,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 @@ -997,7 +990,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 +1013,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 +1192,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 +1276,6 @@ public: } }; -// CLASS TEMPLATE discard_block template class discard_block { // discard_block compound engine public: @@ -1400,7 +1389,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 +1417,6 @@ public: } }; -// CLASS TEMPLATE independent_bits_engine template class independent_bits_engine { // independent_bits_engine compound engine public: @@ -1593,7 +1580,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 +1714,6 @@ basic_ostream<_Elem, _Traits>& operator<<( return _Eng._Write(_Ostr); } -// CLASS TEMPLATE uniform_int template class uniform_int { // uniform integer distribution public: @@ -1882,7 +1867,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 +1904,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; @@ -2077,7 +2060,6 @@ _NODISCARD _Flt _Float_upper_bound(_Ty _Val) { } } -// CLASS TEMPLATE geometric_distribution template class geometric_distribution { // geometric distribution public: @@ -2211,7 +2193,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 +2375,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 +2581,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 +2704,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 +2740,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 +2861,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 +3057,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 +3252,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 +3388,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 +3525,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 +3660,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 +3781,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 +3916,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 +3975,6 @@ private: _Ty _Bx; }; -// CLASS TEMPLATE fisher_f_distribution template class fisher_f_distribution { // fisher_f distribution public: @@ -4154,7 +4122,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 +4258,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 +4403,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 +4599,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 +4791,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 +5070,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..c27324a2eb5 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> @@ -670,7 +667,6 @@ namespace ranges { inline constexpr empty_view<_Ty> empty; } // namespace views - // CLASS TEMPLATE ranges::single_view // clang-format off template requires is_object_v<_Ty> @@ -740,7 +736,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>>; @@ -1071,7 +1066,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 +1148,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> @@ -1272,7 +1265,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> @@ -1547,7 +1539,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>; @@ -2037,7 +2028,6 @@ namespace ranges { inline constexpr _Transform_fn transform; } // namespace views - // CLASS TEMPLATE ranges::take_view template class take_view : public view_interface> { private: @@ -2339,7 +2329,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> @@ -2526,7 +2515,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>> { @@ -2775,7 +2763,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> @@ -2879,7 +2866,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> @@ -3255,7 +3241,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> @@ -3723,7 +3708,6 @@ namespace ranges { inline constexpr _Counted_fn counted; } // namespace views - // CLASS TEMPLATE ranges::common_view // clang-format off template requires (!common_range<_Vw> && copyable>) @@ -3840,7 +3824,6 @@ namespace ranges { inline constexpr _Common_fn common; } // namespace views - // CLASS TEMPLATE ranges::reverse_view // clang-format off template requires bidirectional_range<_Vw> @@ -3993,7 +3976,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; diff --git a/stl/inc/regex b/stl/inc/regex index 02badc1ed90..429f64c8978 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) {} @@ -605,7 +601,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 +988,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: @@ -1329,7 +1323,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) @@ -1353,7 +1346,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 +1358,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 +1365,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 +1376,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 +1383,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 +1390,6 @@ public: unsigned int _Idx; }; -// CLASS TEMPLATE _Node_str template class _Node_str : public _Node_base { // node that holds text public: @@ -1411,7 +1398,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 +1429,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 +1453,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 +1464,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 +1484,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 +1546,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 +1553,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 +1568,6 @@ public: } }; -// CLASS TEMPLATE _Matcher template class _Matcher { // provides ways to match a regular expression to a text sequence public: @@ -1711,7 +1688,6 @@ enum _Prs_ret { // indicate class element type _Prs_set }; -// CLASS TEMPLATE _Parser template class _Parser { // parse a regular expression public: @@ -1807,7 +1783,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 +1799,6 @@ public: #endif // 0 < _ITERATOR_DEBUG_LEVEL }; -// CLASS TEMPLATE basic_regex template > class basic_regex : public _Regex_base { // regular expression public: @@ -2439,7 +2413,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 +2542,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..e134c3653a6 100644 --- a/stl/inc/scoped_allocator +++ b/stl/inc/scoped_allocator @@ -49,7 +49,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 +124,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..ce556f57ba4 100644 --- a/stl/inc/set +++ b/stl/inc/set @@ -21,12 +21,10 @@ _STL_DISABLE_CLANG_WARNINGS #pragma push_macro("new") #undef new _STD_BEGIN -// CLASS TEMPLATE _Tset_traits -template // true if multiple equivalent keys are permitted -class _Tset_traits { // traits required to make _Tree behave like a set + bool _Mfl > // true if multiple equivalent keys are permitted + class _Tset_traits { // traits required to make _Tree behave like a set public: using key_type = _Kty; using value_type = _Kty; @@ -49,114 +47,111 @@ public: } }; -// CLASS TEMPLATE set template , class _Alloc = allocator<_Kty>> -class set : public _Tree<_Tset_traits<_Kty, _Pr, _Alloc, false>> { - // ordered red-black tree of key values, unique keys -public: - static_assert(!_ENFORCE_MATCHING_ALLOCATORS || is_same_v<_Kty, typename _Alloc::value_type>, - _MISMATCHED_ALLOCATOR_MESSAGE("set", "T")); - - using _Mybase = _Tree<_Tset_traits<_Kty, _Pr, _Alloc, false>>; - using key_type = _Kty; - using key_compare = _Pr; - using value_compare = typename _Mybase::value_compare; - using value_type = typename _Mybase::value_type; - using allocator_type = typename _Mybase::allocator_type; - using size_type = typename _Mybase::size_type; - using difference_type = typename _Mybase::difference_type; - using pointer = typename _Mybase::pointer; - using const_pointer = typename _Mybase::const_pointer; - using reference = value_type&; - using const_reference = const value_type&; - using iterator = typename _Mybase::iterator; - using const_iterator = typename _Mybase::const_iterator; - using reverse_iterator = typename _Mybase::reverse_iterator; - using const_reverse_iterator = typename _Mybase::const_reverse_iterator; - - using _Alnode = typename _Mybase::_Alnode; - using _Alnode_traits = typename _Mybase::_Alnode_traits; +// ordered red-black tree of key values, unique keys +public : static_assert(!_ENFORCE_MATCHING_ALLOCATORS || is_same_v<_Kty, typename _Alloc::value_type>, + _MISMATCHED_ALLOCATOR_MESSAGE("set", "T")); + +using _Mybase = _Tree<_Tset_traits<_Kty, _Pr, _Alloc, false>>; +using key_type = _Kty; +using key_compare = _Pr; +using value_compare = typename _Mybase::value_compare; +using value_type = typename _Mybase::value_type; +using allocator_type = typename _Mybase::allocator_type; +using size_type = typename _Mybase::size_type; +using difference_type = typename _Mybase::difference_type; +using pointer = typename _Mybase::pointer; +using const_pointer = typename _Mybase::const_pointer; +using reference = value_type&; +using const_reference = const value_type&; +using iterator = typename _Mybase::iterator; +using const_iterator = typename _Mybase::const_iterator; +using reverse_iterator = typename _Mybase::reverse_iterator; +using const_reverse_iterator = typename _Mybase::const_reverse_iterator; + +using _Alnode = typename _Mybase::_Alnode; +using _Alnode_traits = typename _Mybase::_Alnode_traits; #if _HAS_CXX17 - using insert_return_type = _Insert_return_type; +using insert_return_type = _Insert_return_type; #endif // _HAS_CXX17 - set() : _Mybase(key_compare()) {} +set() : _Mybase(key_compare()) {} - explicit set(const allocator_type& _Al) : _Mybase(key_compare(), _Al) {} +explicit set(const allocator_type& _Al) : _Mybase(key_compare(), _Al) {} - set(const set& _Right) : _Mybase(_Right, _Alnode_traits::select_on_container_copy_construction(_Right._Getal())) {} +set(const set& _Right) : _Mybase(_Right, _Alnode_traits::select_on_container_copy_construction(_Right._Getal())) {} - set(const set& _Right, const allocator_type& _Al) : _Mybase(_Right, _Al) {} +set(const set& _Right, const allocator_type& _Al) : _Mybase(_Right, _Al) {} - explicit set(const key_compare& _Pred) : _Mybase(_Pred) {} +explicit set(const key_compare& _Pred) : _Mybase(_Pred) {} - set(const key_compare& _Pred, const allocator_type& _Al) : _Mybase(_Pred, _Al) {} +set(const key_compare& _Pred, const allocator_type& _Al) : _Mybase(_Pred, _Al) {} - template - set(_Iter _First, _Iter _Last) : _Mybase(key_compare()) { - this->insert(_First, _Last); - } +template +set(_Iter _First, _Iter _Last) : _Mybase(key_compare()) { + this->insert(_First, _Last); +} - template - set(_Iter _First, _Iter _Last, const key_compare& _Pred) : _Mybase(_Pred) { - this->insert(_First, _Last); - } +template +set(_Iter _First, _Iter _Last, const key_compare& _Pred) : _Mybase(_Pred) { + this->insert(_First, _Last); +} - template - set(_Iter _First, _Iter _Last, const allocator_type& _Al) : _Mybase(key_compare(), _Al) { - this->insert(_First, _Last); - } +template +set(_Iter _First, _Iter _Last, const allocator_type& _Al) : _Mybase(key_compare(), _Al) { + this->insert(_First, _Last); +} - template - set(_Iter _First, _Iter _Last, const key_compare& _Pred, const allocator_type& _Al) : _Mybase(_Pred, _Al) { - this->insert(_First, _Last); - } +template +set(_Iter _First, _Iter _Last, const key_compare& _Pred, const allocator_type& _Al) : _Mybase(_Pred, _Al) { + this->insert(_First, _Last); +} - set& operator=(const set& _Right) { - _Mybase::operator=(_Right); - return *this; - } +set& operator=(const set& _Right) { + _Mybase::operator=(_Right); + return *this; +} - set(set&& _Right) : _Mybase(_STD move(_Right)) {} +set(set&& _Right) : _Mybase(_STD move(_Right)) {} - set(set&& _Right, const allocator_type& _Al) : _Mybase(_STD move(_Right), _Al) {} +set(set&& _Right, const allocator_type& _Al) : _Mybase(_STD move(_Right), _Al) {} - set& operator=(set&& _Right) noexcept(_Alnode_traits::is_always_equal::value&& is_nothrow_move_assignable_v<_Pr>) { - _Mybase::operator=(_STD move(_Right)); - return *this; - } +set& operator=(set&& _Right) noexcept(_Alnode_traits::is_always_equal::value&& is_nothrow_move_assignable_v<_Pr>) { + _Mybase::operator=(_STD move(_Right)); + return *this; +} - void swap(set& _Right) noexcept(noexcept(_Mybase::swap(_Right))) { - _Mybase::swap(_Right); - } +void swap(set& _Right) noexcept(noexcept(_Mybase::swap(_Right))) { + _Mybase::swap(_Right); +} - set(initializer_list _Ilist) : _Mybase(key_compare()) { - this->insert(_Ilist); - } +set(initializer_list _Ilist) : _Mybase(key_compare()) { + this->insert(_Ilist); +} - set(initializer_list _Ilist, const key_compare& _Pred) : _Mybase(_Pred) { - this->insert(_Ilist); - } +set(initializer_list _Ilist, const key_compare& _Pred) : _Mybase(_Pred) { + this->insert(_Ilist); +} - set(initializer_list _Ilist, const allocator_type& _Al) : _Mybase(key_compare(), _Al) { - this->insert(_Ilist); - } +set(initializer_list _Ilist, const allocator_type& _Al) : _Mybase(key_compare(), _Al) { + this->insert(_Ilist); +} - set(initializer_list _Ilist, const key_compare& _Pred, const allocator_type& _Al) - : _Mybase(_Pred, _Al) { - this->insert(_Ilist); - } +set(initializer_list _Ilist, const key_compare& _Pred, const allocator_type& _Al) : _Mybase(_Pred, _Al) { + this->insert(_Ilist); +} - set& operator=(initializer_list _Ilist) { - this->clear(); - this->insert(_Ilist); - return *this; - } +set& operator=(initializer_list _Ilist) { + this->clear(); + this->insert(_Ilist); + return *this; +} - using _Mybase::_Unchecked_begin; - using _Mybase::_Unchecked_end; -}; +using _Mybase::_Unchecked_begin; +using _Mybase::_Unchecked_end; +} +; #if _HAS_CXX17 template >, class _Alloc = allocator<_Iter_value_t<_Iter>>, @@ -229,10 +224,8 @@ 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 public: static_assert(!_ENFORCE_MATCHING_ALLOCATORS || is_same_v<_Kty, typename _Alloc::value_type>, _MISMATCHED_ALLOCATOR_MESSAGE("multiset", "T")); 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..1d88b133899 100644 --- a/stl/inc/span +++ b/stl/inc/span @@ -317,7 +317,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: 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/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..0626f4ed0da 100644 --- a/stl/inc/system_error +++ b/stl/inc/system_error @@ -62,7 +62,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 +130,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 +222,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 @@ -436,7 +433,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/tuple b/stl/inc/tuple index 6e69ab4f25b..8e40f941d61 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -189,7 +189,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 +795,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 diff --git a/stl/inc/type_traits b/stl/inc/type_traits index 98b95870251..bc00bb3df75 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -1901,7 +1901,6 @@ template using _Weak_types = conditional_t>, _Function_args>, conditional_t, _Is_memfunptr>, _Weak_binary_args<_Ty>>>; -// CLASS TEMPLATE reference_wrapper template void _Refwrap_ctor_fun(_Identity_t<_Ty&>) noexcept; template diff --git a/stl/inc/typeinfo b/stl/inc/typeinfo index 45cd623b7d1..c134036c58d 100644 --- a/stl/inc/typeinfo +++ b/stl/inc/typeinfo @@ -29,7 +29,6 @@ constexpr int _Small_object_num_ptrs = 6 + 16 / sizeof(void*); #if !_HAS_EXCEPTIONS -// CLASS bad_cast class _CRTIMP2_IMPORT bad_cast : public exception { // base of all bad cast exceptions public: bad_cast(const char* _Message = "bad cast") noexcept : exception(_Message) {} @@ -42,7 +41,6 @@ protected: } }; -// CLASS bad_typeid class _CRTIMP2_IMPORT bad_typeid : public exception { // base of all bad typeid exceptions public: bad_typeid(const char* _Message = "bad typeid") noexcept : exception(_Message) {} diff --git a/stl/inc/unordered_map b/stl/inc/unordered_map index c5633ff84a4..d5c868d4805 100644 --- a/stl/inc/unordered_map +++ b/stl/inc/unordered_map @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Umap_traits template , class _Keyeq = equal_to<_Kty>, class _Alloc = allocator>> class unordered_map : public _Hash<_Umap_traits<_Kty, _Ty, _Uhash_compare<_Kty, _Hasher, _Keyeq>, _Alloc, false>> { @@ -476,7 +474,6 @@ _NODISCARD bool operator!=(const unordered_map<_Kty, _Ty, _Hasher, _Keyeq, _Allo } #endif // !_HAS_CXX20 -// CLASS TEMPLATE unordered_multimap template , class _Keyeq = equal_to<_Kty>, class _Alloc = allocator>> class unordered_multimap : public _Hash<_Umap_traits<_Kty, _Ty, _Uhash_compare<_Kty, _Hasher, _Keyeq>, _Alloc, true>> { diff --git a/stl/inc/unordered_set b/stl/inc/unordered_set index 2a7125567b6..1d8e6716df5 100644 --- a/stl/inc/unordered_set +++ b/stl/inc/unordered_set @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Uset_traits template , class _Keyeq = equal_to<_Kty>, class _Alloc = allocator<_Kty>> class unordered_set : public _Hash<_Uset_traits<_Kty, _Uhash_compare<_Kty, _Hasher, _Keyeq>, _Alloc, false>> { // hash table of key-values, unique keys @@ -330,7 +328,6 @@ _NODISCARD bool operator!=(const unordered_set<_Kty, _Hasher, _Keyeq, _Alloc>& _ } #endif // !_HAS_CXX20 -// CLASS TEMPLATE unordered_multiset template , class _Keyeq = equal_to<_Kty>, class _Alloc = allocator<_Kty>> class unordered_multiset : public _Hash<_Uset_traits<_Kty, _Uhash_compare<_Kty, _Hasher, _Keyeq>, _Alloc, true>> { // hash table of key-values, non-unique keys diff --git a/stl/inc/valarray b/stl/inc/valarray index 5f5a6ab33fc..9cebb6d114e 100644 --- a/stl/inc/valarray +++ b/stl/inc/valarray @@ -57,7 +57,6 @@ _Ty* _Allocate_for_op_delete(size_t _Count) { using _Boolarray = valarray; using _Sizarray = valarray; -// CLASS TEMPLATE valarray template class valarray { // store array with various indexing options private: @@ -1353,7 +1352,6 @@ _NODISCARD valarray<_Ty> tanh(const valarray<_Ty>& _Left) { return _Ans; } -// CLASS slice class slice { // define a slice of a valarray public: slice() = default; @@ -1385,7 +1383,6 @@ protected: size_t _Stride = 0; // the distance between elements }; -// CLASS TEMPLATE slice_array template class slice_array : public slice { // define a slice of a valarray public: @@ -1500,7 +1497,6 @@ private: _Ty* _Myptr; // pointer to valarray contents }; -// CLASS gslice class gslice { // define a generalized (multidimensional) slice of a valarray public: gslice() : _Start(0) {} // construct with all zeros @@ -1563,7 +1559,6 @@ private: _Sizarray _Stride; // array of distances between elements }; -// CLASS TEMPLATE gslice_array template class gslice_array : public gslice { // define a generalized slice of a valarray public: @@ -1691,7 +1686,6 @@ private: _Ty* _Myptr; // pointer to valarray contents }; -// CLASS TEMPLATE mask_array template class mask_array { // define a subset of a valarray with an array of mask bits public: @@ -1841,7 +1835,6 @@ private: _Ty* _Myptr; // pointer to valarray contents }; -// CLASS TEMPLATE indirect_array template class indirect_array { // define a subset of a valarray with an array of indexes public: diff --git a/stl/inc/variant b/stl/inc/variant index 3a814330096..6be402b9e81 100644 --- a/stl/inc/variant +++ b/stl/inc/variant @@ -419,7 +419,6 @@ struct variant_alternative<_Idx, variant<_Types...>> { inline constexpr size_t variant_npos = _Meta_npos; -// CLASS bad_variant_access [variant.bad.access] class bad_variant_access : public exception { // exception for visit of a valueless variant or get on a variant with index() != I public: @@ -956,7 +955,6 @@ template using _Variant_destroy_layer = conditional_t...>, _Variant_base<_Types...>, _Variant_destroy_layer_<_Types...>>; -// CLASS TEMPLATE variant #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-volatile" diff --git a/stl/inc/vector b/stl/inc/vector index 624486f7820..f7606618440 100644 --- a/stl/inc/vector +++ b/stl/inc/vector @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Vector_const_iterator template class _Vector_const_iterator : public _Iterator_base { public: @@ -246,7 +245,6 @@ struct pointer_traits<_Vector_const_iterator<_Myvec>> { }; #endif // _HAS_CXX20 -// CLASS TEMPLATE _Vector_iterator template class _Vector_iterator : public _Vector_const_iterator<_Myvec> { public: @@ -388,7 +386,6 @@ struct _Value_init_tag { // tag to request value-initialization explicit _Value_init_tag() = default; }; -// CLASS TEMPLATE _Vector_val template class _Vector_val : public _Container_base { public: @@ -440,7 +437,6 @@ constexpr _Ty* _Unfancy_maybe_null(_Ty* _Ptr) noexcept { // do nothing for plain return _Ptr; } -// CLASS TEMPLATE vector template > class vector { // varying size array of values private: @@ -1953,13 +1949,11 @@ constexpr typename vector<_Ty, _Alloc>::size_type erase_if(vector<_Ty, _Alloc>& } #endif // _HAS_CXX20 -// CLASS TEMPLATE vector AND FRIENDS template struct _Wrap_alloc { // TRANSITION, ABI compat, preserves symbol names of vector::iterator using _Alloc = _Alloc0; }; -// CLASS _Vb_iter_base template class _Vb_iter_base : public _Iterator_base { // store information common to reference and iterators @@ -1995,7 +1989,6 @@ public: _Size_type _Myoff = 0; }; -// CLASS _Vb_reference template class _Vb_reference : public _Vb_iter_base<_Alvbase_wrapped> { // reference to a bit within a base word @@ -2057,7 +2050,6 @@ protected: } }; -// CLASS _Vb_const_iterator template class _Vb_const_iterator : public _Vb_iter_base<_Alvbase_wrapped> { private: @@ -2264,7 +2256,6 @@ _NODISCARD _CONSTEXPR20 _Vb_const_iterator<_Alvbase_wrapped> operator+( return _Right; } -// CLASS _Vb_iterator template class _Vb_iterator : public _Vb_const_iterator<_Alvbase_wrapped> { public: @@ -2357,7 +2348,6 @@ _NODISCARD _CONSTEXPR20 _Vb_iterator<_Alvbase_wrapped> operator+( return _Right; } -// CLASS TEMPLATE _Vb_val template class _Vb_val : public _Container_base { public: @@ -2435,7 +2425,6 @@ public: size_type _Mysize; // current length of sequence }; -// CLASS vector template class vector : public _Vb_val<_Alloc> { public: diff --git a/stl/inc/xfacet b/stl/inc/xfacet index b83f3a8e6cb..86a985637e0 100644 --- a/stl/inc/xfacet +++ b/stl/inc/xfacet @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS // In particular, basic_string must not be included here. _STD_BEGIN -// CLASS _Facet_base class _CRTIMP2_PURE_IMPORT _Facet_base { // code for reference counting a facet public: virtual __CLR_OR_THIS_CALL ~_Facet_base() noexcept {} // ensure that derived classes can be destroyed properly diff --git a/stl/inc/xhash b/stl/inc/xhash index 989363ce03c..ce3845be7bf 100644 --- a/stl/inc/xhash +++ b/stl/inc/xhash @@ -56,7 +56,6 @@ namespace stdext { return _STD _Hash_array_representation(_Str, _CSTD wcslen(_Str)); } - // CLASS TEMPLATE hash_compare template > class hash_compare { // traits class for hash containers public: @@ -113,7 +112,6 @@ template _INLINE_VAR constexpr bool _Nothrow_hash = noexcept( static_cast(_STD declval()(_STD declval()))); -// CLASS TEMPLATE _Uhash_compare template class _Uhash_compare : public _Uhash_choose_transparency<_Kty, _Hasher, _Keyeq> { // traits class for unordered containers @@ -167,7 +165,6 @@ public: _Compressed_pair<_Hasher, _Compressed_pair<_Keyeq, float>> _Mypair; }; -// CLASS TEMPLATE _Reinterpret_move_iter template struct _Reinterpret_move_iter { _Iter _Base; @@ -320,7 +317,6 @@ struct _Hash_vec { _Compressed_pair<_Aliter, _Aliter_scary_val> _Mypair; }; -// CLASS TEMPLATE _Hash template class _Hash { // hash table -- list with vector of iterators for quick access protected: diff --git a/stl/inc/xiosbase b/stl/inc/xiosbase index bf5bf3a072e..b6aa7141d1b 100644 --- a/stl/inc/xiosbase +++ b/stl/inc/xiosbase @@ -20,7 +20,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Iosb template class _Iosb { // define templatized bitmask/enumerated types, instantiate on demand public: @@ -168,7 +167,6 @@ const typename _Iosb<_Dummy>::_Seekdir _Iosb<_Dummy>::cur; template const typename _Iosb<_Dummy>::_Seekdir _Iosb<_Dummy>::end; -// CLASS ios_base class _CRTIMP2_PURE_IMPORT ios_base : public _Iosb { // base class for ios public: using fmtflags = int; @@ -195,7 +193,6 @@ public: using seek_dir = unsigned int; #endif // _HAS_OLD_IOSTREAMS_MEMBERS - // CLASS failure class failure : public system_error { // base of all iostreams exceptions public: explicit failure(const string& _Message, const error_code& _Errcode = make_error_code(io_errc::stream)) @@ -212,7 +209,6 @@ public: #endif // !_HAS_EXCEPTIONS }; - // CLASS Init class _CRTIMP2_PURE_IMPORT Init { // controller for standard-stream initialization public: __CLR_OR_THIS_CALL Init() { // initialize standard streams on first construction diff --git a/stl/inc/xlocale b/stl/inc/xlocale index 7a20b8d3f91..38d62bfd6b6 100644 --- a/stl/inc/xlocale +++ b/stl/inc/xlocale @@ -23,7 +23,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Locbase template class _Locbase { // define templatized category constants, instantiate on demand public: @@ -54,7 +53,6 @@ const int _Locbase<_Dummy>::all; template const int _Locbase<_Dummy>::none; -// CLASS locale template class collate; @@ -93,7 +91,6 @@ class locale : public _Locbase, public _Crt_new_delete { // nonmutable coll public: using category = int; - // CLASS id class _CRTIMP2_PURE_IMPORT id { // identifier stamp, unique for each distinct kind of facet public: __CLR_OR_THIS_CALL id(size_t _Val = 0) : _Id(_Val) {} @@ -120,7 +117,6 @@ public: class _Locimp; - // CLASS facet class _CRTIMP2_PURE_IMPORT facet : public _Facet_base, public _Crt_new_delete { // base class for all locale facets, performs reference counting private: @@ -168,7 +164,6 @@ public: } }; - // CLASS _Locimp class _CRTIMP2_PURE_IMPORT _Locimp : public facet { // reference-counted actual implementation of a locale protected: __CLR_OR_THIS_CALL ~_Locimp() noexcept { @@ -661,7 +656,6 @@ protected: } }; -// CLASS TEMPLATE codecvt template class codecvt : public codecvt_base { // facet for converting between _Elem and _Byte sequences public: @@ -843,7 +837,6 @@ _NODISCARD int _Codecvt_do_length( // ENUM _Codecvt_mode enum _Codecvt_mode { _Consume_header = 4, _Generate_header = 2 }; -// CLASS codecvt template <> class _CRTIMP2_PURE_IMPORT_UNLESS_CODECVT_ID_SATELLITE _CXX20_DEPRECATE_CODECVT_FACETS codecvt : public codecvt_base { @@ -1142,7 +1135,6 @@ private: _Codecvt_mode _Mode; // default: _Consume_header }; -// CLASS codecvt template <> class _CRTIMP2_PURE_IMPORT_UNLESS_CODECVT_ID_SATELLITE _CXX20_DEPRECATE_CODECVT_FACETS codecvt : public codecvt_base { @@ -1397,7 +1389,6 @@ struct _NODISCARD _Codecvt_guard { } }; -// CLASS codecvt template <> class codecvt : public codecvt_base { // facet for converting between UTF-16 and UTF-8 sequences @@ -1679,7 +1670,6 @@ protected: } }; -// CLASS codecvt template <> class codecvt : public codecvt_base { // facet for converting between UTF-32 and UTF-8 sequences @@ -1923,7 +1913,6 @@ protected: }; #endif // defined(__cpp_char8_t) && !defined(_M_CEE_PURE) -// CLASS codecvt template <> class _CRTIMP2_PURE_IMPORT codecvt : public codecvt_base { // facet for converting between wchar_t and char (_Byte) sequences @@ -2123,7 +2112,6 @@ private: }; #ifdef _NATIVE_WCHAR_T_DEFINED -// CLASS codecvt template <> class _CRTIMP2_PURE_IMPORT codecvt : public codecvt_base { // facet for converting between unsigned short and char sequences @@ -2325,7 +2313,6 @@ private: }; #endif // _NATIVE_WCHAR_T_DEFINED -// CLASS TEMPLATE codecvt_byname template class codecvt_byname : public codecvt<_Elem, _Byte, _Statype> { // codecvt for named locale public: @@ -2391,7 +2378,6 @@ struct _CRTIMP2_PURE_IMPORT ctype_base : locale::facet { // base for ctype #undef _UP #undef _XD -// CLASS TEMPLATE ctype template class ctype : public ctype_base { // facet for classifying elements, converting cases public: @@ -2626,7 +2612,6 @@ locale::id ctype<_Elem>::id; #pragma clang diagnostic pop #endif // __clang__ -// CLASS ctype template <> class _CRTIMP2_PURE_IMPORT ctype : public ctype_base { // facet for classifying char elements, converting cases public: @@ -2817,7 +2802,6 @@ private: _Locinfo::_Ctypevec _Ctype; // information }; -// CLASS ctype template <> class _CRTIMP2_PURE_IMPORT ctype : public ctype_base { // facet for classifying wchar_t elements, converting cases @@ -3019,7 +3003,6 @@ private: }; #ifdef _NATIVE_WCHAR_T_DEFINED -// CLASS ctype template <> class _CRTIMP2_PURE_IMPORT ctype : public ctype_base { // facet for classifying unsigned short elements, converting cases @@ -3227,7 +3210,6 @@ private: }; #endif // _NATIVE_WCHAR_T_DEFINED -// CLASS TEMPLATE ctype_byname template class ctype_byname : public ctype<_Elem> { // ctype for named locale public: diff --git a/stl/inc/xlocbuf b/stl/inc/xlocbuf index d9e3c05eea3..5208ac26ee7 100644 --- a/stl/inc/xlocbuf +++ b/stl/inc/xlocbuf @@ -19,7 +19,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN _STL_DISABLE_DEPRECATED_WARNING -// CLASS TEMPLATE wbuffer_convert template > class _CXX17_DEPRECATE_CODECVT_HEADER wbuffer_convert : public basic_streambuf<_Elem, _Traits> { // stream buffer associated with a codecvt facet @@ -297,7 +296,6 @@ private: locale _Loc; // manages reference to codecvt facet }; -// CLASS TEMPLATE wstring_convert template , class _Balloc = allocator> class _CXX17_DEPRECATE_CODECVT_HEADER wstring_convert { // converts between _Elem (wide) and char (byte) strings enum { _BUF_INC = 8, _BUF_MAX = 16 }; diff --git a/stl/inc/xlocinfo b/stl/inc/xlocinfo index fc804593a63..14527cba8e9 100644 --- a/stl/inc/xlocinfo +++ b/stl/inc/xlocinfo @@ -117,7 +117,6 @@ _MRTIMP2 _locale_t __cdecl _GetLocaleForCP(unsigned int); #endif // _M_CEE_PURE _STD_BEGIN -// CLASS _Timevec class _CRTIMP2_PURE_IMPORT _Timevec { // smart pointer to information used by _Strftime public: explicit __CLR_OR_THIS_CALL _Timevec(void* _Ptr = nullptr) : _Timeptr(_Ptr) {} @@ -148,7 +147,6 @@ private: void* _Timeptr; // pointer to time information }; -// CLASS TEMPLATE _Yarn template class _CRTIMP2_PURE_IMPORT _Yarn { // wrap a NTCTS public: @@ -230,7 +228,6 @@ private: _Elem _Nul; // nul terminator for unallocated string }; -// CLASS _Locinfo class _CRTIMP2_PURE_IMPORT _Locinfo { // summary of all stuff specific to a locale used by standard facets public: using _Collvec = ::_Collvec; diff --git a/stl/inc/xlocmes b/stl/inc/xlocmes index ef4347ffecc..568e036457e 100644 --- a/stl/inc/xlocmes +++ b/stl/inc/xlocmes @@ -25,7 +25,6 @@ struct messages_base : locale::facet { // base class for messages explicit messages_base(size_t _Refs = 0) : locale::facet(_Refs) {} }; -// CLASS TEMPLATE messages template class messages : public messages_base { // facet for obtaining messages from a catalog public: @@ -105,7 +104,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id messages<_Elem>::id; #pragma clang diagnostic pop #endif // __clang__ -// CLASS TEMPLATE messages_byname template class messages_byname : public messages<_Elem> { // messages for named locale public: diff --git a/stl/inc/xlocmon b/stl/inc/xlocmon index 5a48a311037..b30df05a760 100644 --- a/stl/inc/xlocmon +++ b/stl/inc/xlocmon @@ -37,7 +37,6 @@ struct money_base : locale::facet { // ultimate base class for moneypunct money_base(size_t _Refs = 0) : locale::facet(_Refs) {} }; -// CLASS TEMPLATE _Mpunct template class _Mpunct : public money_base { // common base class for moneypunct<_Elem, false/true> public: @@ -244,7 +243,6 @@ private: _Locinfo::_Cvtvec _Cvt; // conversion information }; -// CLASS TEMPLATE moneypunct template class moneypunct : public _Mpunct<_Elem> { // facet for defining monetary punctuation text public: @@ -291,7 +289,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id moneypunct<_Elem, _Intl>::id; #pragma clang diagnostic pop #endif // __clang__ -// CLASS TEMPLATE moneypunct_byname template class moneypunct_byname : public moneypunct<_Elem, _Intl> { // moneypunct for named locale public: @@ -307,7 +304,6 @@ protected: virtual __CLR_OR_THIS_CALL ~moneypunct_byname() noexcept {} }; -// CLASS TEMPLATE money_get template >> class money_get : public locale::facet { // facet for converting text to encoded monetary amounts using _Mypunct0 = moneypunct<_Elem, false>; @@ -613,7 +609,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id money_get<_Elem, _InIt>::id; #pragma clang diagnostic pop #endif // __clang__ -// CLASS TEMPLATE money_put template >> class money_put : public locale::facet { // facet for converting encoded monetary amounts to text using _Mypunct0 = moneypunct<_Elem, false>; diff --git a/stl/inc/xlocnum b/stl/inc/xlocnum index 9b1c2b0bda7..2a14d6f3ef1 100644 --- a/stl/inc/xlocnum +++ b/stl/inc/xlocnum @@ -100,7 +100,6 @@ inline wchar_t* _Maklocwcs(const wchar_t* _Ptr) { // copy NTWCS to allocated sto return _Ptrdest; } -// CLASS TEMPLATE numpunct template class numpunct : public locale::facet { // facet for defining numeric punctuation text private: @@ -236,7 +235,6 @@ private: const _Elem* _Truename; // name for true, "true" for "C" locale }; -// CLASS TEMPLATE numpunct_byname template class numpunct_byname : public numpunct<_Elem> { // numpunct for named locale public: @@ -267,7 +265,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id numpunct<_Elem>::id; #endif // __clang__ #endif // !defined(_CRTBLD) || defined(CRTDLL2) || !defined(_DLL) || defined(_M_CEE_PURE) -// CLASS TEMPLATE num_get template >> class num_get : public locale::facet { // facet for converting text to encoded numbers public: @@ -1185,7 +1182,6 @@ int _Float_put_desired_precision(const streamsize _Precision, const ios_base::fm } } -// CLASS TEMPLATE num_put template >> class num_put : public locale::facet { // facet for converting encoded numbers to text public: diff --git a/stl/inc/xloctime b/stl/inc/xloctime index 7fd8d7be6d4..07a7076e359 100644 --- a/stl/inc/xloctime +++ b/stl/inc/xloctime @@ -35,7 +35,6 @@ struct _CRTIMP2_PURE_IMPORT time_base : locale::facet { // base class for time_g __CLR_OR_THIS_CALL ~time_base() noexcept {} }; -// CLASS TEMPLATE time_get template >> class time_get : public time_base { // facet for converting text to encoded times private: @@ -621,7 +620,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id time_get<_Elem, _InIt>::id; #pragma clang diagnostic pop #endif // __clang__ -// CLASS TEMPLATE time_get_byname template >> class time_get_byname : public time_get<_Elem, _InIt> { // time_get for named locale public: @@ -637,7 +635,6 @@ protected: virtual __CLR_OR_THIS_CALL ~time_get_byname() noexcept {} }; -// CLASS TEMPLATE time_put template >> class time_put : public locale::facet { // facet for converting encoded times to text public: @@ -762,7 +759,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id time_put<_Elem, _OutIt>::id; #pragma clang diagnostic pop #endif // __clang__ -// CLASS time_put template class _CRTIMP2_PURE_IMPORT time_put : public locale::facet { // facet for converting encoded times to wchar_t text @@ -893,7 +889,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id time_put::id; #endif // __clang__ #if defined(_CRTBLD) -// CLASS time_put template class _CRTIMP2_PURE_IMPORT time_put @@ -1025,7 +1020,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id time_put::id; #endif // __clang__ #endif // defined(_CRTBLD) -// CLASS TEMPLATE time_put_byname template >> class time_put_byname : public time_put<_Elem, _OutIt> { // time_put for named locale public: diff --git a/stl/inc/xmemory b/stl/inc/xmemory index 5e761dd34ab..098c25ceeec 100644 --- a/stl/inc/xmemory +++ b/stl/inc/xmemory @@ -781,7 +781,6 @@ struct _Simple_types { // wraps types from allocators with simple addressing for using const_pointer = const value_type*; }; -// CLASS TEMPLATE allocator template class allocator { public: @@ -861,7 +860,6 @@ public: #endif // _HAS_DEPRECATED_ALLOCATOR_MEMBERS }; -// CLASS allocator template <> class allocator { public: @@ -1029,7 +1027,6 @@ struct _Alloc_construct_ptr { // pointer used to help construct 1 _Alloc::value_ _Alloc_construct_ptr& operator=(const _Alloc_construct_ptr&) = delete; }; -// CLASSES _Container_base*, _Iterator_base* struct _Fake_allocator {}; struct _Container_base0 { @@ -1048,7 +1045,6 @@ struct _Iterator_base0 { static constexpr bool _Unwrap_when_unverified = true; }; -// CLASS _Container_proxy struct _Container_base12; struct _Container_proxy { // store head of iterator chain and back pointer _CONSTEXPR20 _Container_proxy() noexcept = default; @@ -1347,7 +1343,6 @@ template using _Container_proxy_ptr = _Container_proxy_ptr12<_Rebind_alloc_t<_Alloc, _Container_proxy>>; #endif // _ITERATOR_DEBUG_LEVEL == 0 -// CLASS TEMPLATE _Compressed_pair struct _Zero_then_variadic_args_t { explicit _Zero_then_variadic_args_t() = default; }; // tag type for value-initializing first, constructing second from remaining args diff --git a/stl/inc/xnode_handle.h b/stl/inc/xnode_handle.h index d962579a054..b49de812bb9 100644 --- a/stl/inc/xnode_handle.h +++ b/stl/inc/xnode_handle.h @@ -30,7 +30,6 @@ struct _Insert_return_type { _NodeType node; }; -// CLASS TEMPLATE _Node_handle template struct _Node_handle_map_base { // map-specific node handle behavior using key_type = _KeyTy; diff --git a/stl/inc/xpolymorphic_allocator.h b/stl/inc/xpolymorphic_allocator.h index 6df84ce7f46..00ecb3996b5 100644 --- a/stl/inc/xpolymorphic_allocator.h +++ b/stl/inc/xpolymorphic_allocator.h @@ -138,7 +138,6 @@ void _Uses_allocator_construct( #if _HAS_CXX17 namespace pmr { - // CLASS memory_resource class __declspec(novtable) memory_resource { public: virtual ~memory_resource() noexcept = default; @@ -188,7 +187,6 @@ namespace pmr { #endif // __cpp_aligned_new } - // CLASS TEMPLATE polymorphic_allocator #if _HAS_CXX20 && defined(__cpp_lib_byte) template #else diff --git a/stl/inc/xstring b/stl/inc/xstring index 075b6a8a021..c137476f945 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -965,7 +965,6 @@ constexpr size_t _Traits_rfind_not_ch(_In_reads_(_Hay_size) const _Traits_ptr_t< #if _HAS_CXX17 -// CLASS TEMPLATE _String_view_iterator template > class basic_string_view; @@ -1235,7 +1234,6 @@ struct pointer_traits<_String_view_iterator<_Traits>> { #endif // _HAS_CXX20 -// CLASS TEMPLATE basic_string_view template class basic_string_view { // wrapper for any kind of contiguous character buffer public: @@ -1936,7 +1934,6 @@ inline namespace literals { } // namespace literals #endif // _HAS_CXX17 -// CLASS TEMPLATE _String_const_iterator template class _String_const_iterator : public _Iterator_base { public: @@ -2178,7 +2175,6 @@ struct pointer_traits<_String_const_iterator<_Mystr>> { }; #endif // _HAS_CXX20 -// CLASS TEMPLATE _String_iterator template class _String_iterator : public _String_const_iterator<_Mystr> { public: @@ -2312,7 +2308,6 @@ struct _String_iter_types { using const_pointer = _Const_pointer; }; -// CLASS TEMPLATE _String_val template class _String_val : public _Container_base { public: @@ -2399,7 +2394,6 @@ public: size_type _Myres = 0; // current storage reserved for string }; -// CLASS TEMPLATE basic_string template constexpr size_t _Size_after_ebco_v = is_empty_v<_Ty> ? 0 : sizeof(_Ty); // get _Ty's size after being EBCO'd diff --git a/stl/inc/xtree b/stl/inc/xtree index 09bae281a13..229be14283d 100644 --- a/stl/inc/xtree +++ b/stl/inc/xtree @@ -22,7 +22,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// CLASS TEMPLATE _Tree_unchecked_const_iterator template class _Tree_unchecked_const_iterator : public _Base { public: @@ -118,7 +117,6 @@ public: _Nodeptr _Ptr; // pointer to node }; -// CLASS TEMPLATE _Tree_unchecked_iterator template class _Tree_unchecked_iterator : public _Tree_unchecked_const_iterator<_Mytree> { public: @@ -164,7 +162,6 @@ public: } }; -// CLASS TEMPLATE _Tree_const_iterator template class _Tree_const_iterator : public _Tree_unchecked_const_iterator<_Mytree, _Iterator_base> { public: @@ -259,7 +256,6 @@ public: } }; -// CLASS TEMPLATE _Tree_iterator template class _Tree_iterator : public _Tree_const_iterator<_Mytree> { public: @@ -421,7 +417,6 @@ struct _Tree_find_hint_result { _Xlength_error("map/set too long"); } -// CLASS TEMPLATE _Tree_val template class _Tree_val : public _Container_base { public: @@ -830,7 +825,6 @@ struct _Tree_temp_node : _Tree_temp_node_alloc<_Alnode> { } }; -// CLASS TEMPLATE _Tree template class _Tree { // ordered red-black tree for map/multimap/set/multiset public: diff --git a/stl/inc/xutility b/stl/inc/xutility index a7c611ce694..423824d8e50 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -1635,7 +1635,6 @@ _NODISCARD _CONSTEXPR17 _BidIt prev(_BidIt _First, _Iter_diff_t<_BidIt> _Off = 1 return _First; } -// CLASS TEMPLATE reverse_iterator template class reverse_iterator { public: @@ -2894,7 +2893,6 @@ namespace ranges { }; // clang-format on - // CLASS ranges::_Not_quite_object class _Not_quite_object { public: // Some overload sets in the library have the property that their constituent function templates are not visible @@ -3206,8 +3204,7 @@ namespace ranges { concept common_range = range<_Rng> && same_as, sentinel_t<_Rng>>; - // CLASS TEMPLATE ranges::view_interface - template + template concept _Can_empty = requires(_Ty __t) { _RANGES empty(__t); }; template @@ -3430,8 +3427,7 @@ _NODISCARD constexpr const tuple_element_t<_Index, tuple<_Types...>>&& get(const namespace ranges { // clang-format off - // CLASS TEMPLATE ranges::subrange - template + template concept _Convertible_to_non_slicing = convertible_to<_From, _To> && !(is_pointer_v> && is_pointer_v> @@ -3723,7 +3719,6 @@ struct _Iterator_base12; // STRUCT _Default_sentinel struct _Default_sentinel {}; // empty struct to serve as the end of a range -// CLASS TEMPLATE move_iterator #ifdef __cpp_lib_concepts template class move_sentinel; @@ -5835,7 +5830,6 @@ _CONSTEXPR20 _Ty* _Swap_ranges_unchecked(_Ty* _First1, _Ty* const _Last1, _Ty* _ } #endif // _USE_STD_VECTOR_ALGORITHMS -// CLASS TEMPLATE _Rng_from_urng template class _Rng_from_urng { // wrap a URNG as an RNG public: @@ -6010,7 +6004,6 @@ struct _Nontrivial_dummy_type { _STL_INTERNAL_STATIC_ASSERT(!is_trivially_default_constructible_v<_Nontrivial_dummy_type>); #if _HAS_CXX17 -// CLASS monostate [variant.monostate] struct monostate {}; #endif // _HAS_CXX17 diff --git a/stl/inc/yvals.h b/stl/inc/yvals.h index 7943b6c484b..0579d4ca852 100644 --- a/stl/inc/yvals.h +++ b/stl/inc/yvals.h @@ -343,7 +343,6 @@ enum _Uninitialized { // tag for suppressing initialization _Noinit }; -// CLASS _Lockit class _CRTIMP2_PURE_IMPORT _Lockit { // lock while object in existence -- MUST NEST public: #ifdef _M_CEE_PURE diff --git a/stl/src/locale.cpp b/stl/src/locale.cpp index f2969d61d01..79f6c65a744 100644 --- a/stl/src/locale.cpp +++ b/stl/src/locale.cpp @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// class locale member functions #if !defined(STDCPP_IMPLIB) #define STDCPP_IMPLIB 0 diff --git a/stl/src/locale0.cpp b/stl/src/locale0.cpp index acd2fc944a2..df38719451c 100644 --- a/stl/src/locale0.cpp +++ b/stl/src/locale0.cpp @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// class locale basic member functions #include #include diff --git a/stl/src/wlocale.cpp b/stl/src/wlocale.cpp index ea572750cd1..464c1992889 100644 --- a/stl/src/wlocale.cpp +++ b/stl/src/wlocale.cpp @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// class locale wide member functions #include #include diff --git a/stl/src/xlocale.cpp b/stl/src/xlocale.cpp index 24185c36d45..1de5111c24d 100644 --- a/stl/src/xlocale.cpp +++ b/stl/src/xlocale.cpp @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// class locale exotic char member functions #include #include From 03a88845160eddea838e57191394873164c9e481 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 22 Jul 2021 10:48:27 +0100 Subject: [PATCH 02/29] Remove FUNCTION --- stl/inc/algorithm | 76 ------------------------------ stl/inc/array | 1 - stl/inc/atomic | 7 --- stl/inc/charconv | 4 -- stl/inc/chrono | 19 -------- stl/inc/cmath | 68 -------------------------- stl/inc/compare | 6 --- stl/inc/complex | 37 --------------- stl/inc/coroutine | 1 - stl/inc/exception | 3 -- stl/inc/execution | 6 --- stl/inc/experimental/deque | 6 +-- stl/inc/experimental/filesystem | 1 - stl/inc/experimental/forward_list | 2 - stl/inc/experimental/list | 2 - stl/inc/experimental/map | 1 - stl/inc/experimental/resumable | 1 - stl/inc/experimental/set | 1 - stl/inc/experimental/string | 2 - stl/inc/experimental/unordered_map | 1 - stl/inc/experimental/unordered_set | 1 - stl/inc/experimental/vector | 2 - stl/inc/filesystem | 40 ---------------- stl/inc/fstream | 3 -- stl/inc/functional | 19 -------- stl/inc/future | 4 -- stl/inc/initializer_list | 2 - stl/inc/iomanip | 6 --- stl/inc/iterator | 3 -- stl/inc/locale | 15 ------ stl/inc/memory | 17 ------- stl/inc/memory_resource | 6 +-- stl/inc/mutex | 7 --- stl/inc/new | 2 - stl/inc/numeric | 15 ------ stl/inc/optional | 2 - stl/inc/random | 2 - stl/inc/regex | 10 ---- stl/inc/scoped_allocator | 1 - stl/inc/span | 2 - stl/inc/string | 1 - stl/inc/system_error | 2 - stl/inc/tuple | 8 ---- stl/inc/type_traits | 13 ----- stl/inc/utility | 15 ------ stl/inc/valarray | 1 - stl/inc/vector | 1 - stl/inc/xatomic.h | 1 - stl/inc/xfilesystem_abi.h | 2 - stl/inc/xhash | 1 - stl/inc/xlocale | 5 -- stl/inc/xlocinfo | 3 -- stl/inc/xlocnum | 4 -- stl/inc/xmemory | 36 +------------- stl/inc/xpolymorphic_allocator.h | 2 - stl/inc/xstddef | 3 -- stl/inc/xstring | 6 --- stl/inc/xtr1common | 1 - stl/inc/xutility | 61 +----------------------- stl/src/filesystem.cpp | 3 -- stl/src/iomanip.cpp | 5 -- stl/src/memory_resource.cpp | 1 - 62 files changed, 7 insertions(+), 572 deletions(-) diff --git a/stl/inc/algorithm b/stl/inc/algorithm index a50de6732ca..24ef5210490 100644 --- a/stl/inc/algorithm +++ b/stl/inc/algorithm @@ -186,7 +186,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 +214,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 +259,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 +275,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) @@ -392,7 +388,6 @@ template _NODISCARD _CONSTEXPR20 _InIt find_if_not(_InIt _First, const _InIt _Last, _Pr _Pred) { // find first element that satisfies !_Pred @@ -414,7 +409,6 @@ template _NODISCARD _CONSTEXPR20 _FwdIt adjacent_find(const _FwdIt _First, _FwdIt _Last, _Pr _Pred) { // find first satisfying _Pred with successor @@ -548,7 +542,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 @@ -615,7 +608,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 @@ -810,7 +802,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, ...) @@ -1144,7 +1135,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); @@ -1207,7 +1197,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 @@ -1271,7 +1260,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 @@ -1403,7 +1391,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); @@ -1603,7 +1590,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) { @@ -1712,7 +1698,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 @@ -1797,7 +1782,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) @@ -1921,7 +1905,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 +1926,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 +2000,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> @@ -2168,7 +2149,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) { @@ -2425,7 +2405,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) { @@ -2692,7 +2671,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) { @@ -2859,7 +2837,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 +2857,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 @@ -3040,7 +3016,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 @@ -3118,7 +3093,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 @@ -3194,7 +3168,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 @@ -3292,7 +3265,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 @@ -3503,7 +3475,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 +3494,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 +3522,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 +3551,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 @@ -3857,7 +3825,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 @@ -3971,7 +3938,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE unique_copy // clang-format off #ifdef __cpp_lib_concepts template @@ -4243,7 +4209,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) @@ -4501,7 +4466,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) @@ -4584,7 +4548,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) { @@ -4790,7 +4753,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 @@ -4881,7 +4843,6 @@ 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 @@ -4905,7 +4866,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 +4874,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 +4913,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 +4993,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 @@ -5183,7 +5140,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, @@ -5556,7 +5512,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) { @@ -5669,7 +5624,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) { @@ -5841,7 +5795,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 @@ -5923,7 +5876,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 @@ -6074,7 +6026,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 @@ -6209,7 +6160,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 @@ -6296,7 +6246,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 @@ -6404,7 +6353,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 @@ -6455,7 +6403,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE merge _NODISCARD constexpr _Distance_unknown _Idl_dist_add(_Distance_unknown, _Distance_unknown) { return {}; } @@ -6630,7 +6577,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 +6842,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>> @@ -7236,7 +7181,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) @@ -7642,7 +7586,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 @@ -8095,7 +8038,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 @@ -8221,7 +8163,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) @@ -8376,7 +8317,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 @@ -8501,7 +8441,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 +8472,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 */ { @@ -8628,7 +8566,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) @@ -8768,7 +8705,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) { @@ -8903,7 +8839,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) { @@ -9035,7 +8970,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) { @@ -9189,7 +9123,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; @@ -9282,7 +9215,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; @@ -9375,7 +9307,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 @@ -9537,7 +9468,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 @@ -9617,7 +9547,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 @@ -9689,7 +9618,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 */ { @@ -9824,7 +9752,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 @@ -9935,7 +9862,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 @@ -10046,7 +9972,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 @@ -10166,7 +10091,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] diff --git a/stl/inc/array b/stl/inc/array index 06c72ec6add..25d9e6c56b3 100644 --- a/stl/inc/array +++ b/stl/inc/array @@ -847,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..5b343dcdf53 100644 --- a/stl/inc/atomic +++ b/stl/inc/atomic @@ -201,13 +201,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 +213,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 +229,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 +245,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 +277,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 +292,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: diff --git a/stl/inc/charconv b/stl/inc/charconv index 4b33f78ff5a..82405d60108 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 { @@ -214,7 +213,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, @@ -1644,7 +1642,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 @@ -2060,7 +2057,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 547d40f6cda..b869fb08efa 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -441,7 +441,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 */ { @@ -472,7 +471,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 */ { @@ -486,7 +484,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 */ { @@ -500,7 +497,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 @@ -524,7 +520,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 */ { @@ -631,7 +626,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 */ { @@ -639,7 +633,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 */ { @@ -647,7 +640,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 */ { @@ -655,7 +647,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( @@ -2860,7 +2851,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) { @@ -2894,22 +2884,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(); @@ -2922,7 +2908,6 @@ namespace chrono { _CATCH_END } - // FUNCTION remote_version _NODISCARD inline string remote_version() { const auto& _Tzdb = _CHRONO get_tzdb(); const auto& _Version = _Tzdb.version; @@ -3138,7 +3123,6 @@ namespace chrono { 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); @@ -3591,7 +3575,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) { @@ -4986,7 +4969,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, @@ -5174,7 +5156,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/compare b/stl/inc/compare index eb2afb42945..72e7a511690 100644 --- a/stl/inc/compare +++ b/stl/inc/compare @@ -231,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; } diff --git a/stl/inc/complex b/stl/inc/complex index c298990a344..5c74b2a36b6 100644 --- a/stl/inc/complex +++ b/stl/inc/complex @@ -1393,7 +1393,6 @@ public: } }; -// FUNCTION TEMPLATE operator+ template _NODISCARD _CONSTEXPR20 complex<_Ty> operator+(const complex<_Ty>& _Left, const complex<_Ty>& _Right) { complex<_Ty> _Tmp(_Left); @@ -1415,7 +1414,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); @@ -1437,7 +1435,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); @@ -1460,7 +1457,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); @@ -1483,19 +1479,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(); @@ -1513,7 +1506,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) { @@ -1531,13 +1523,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(); @@ -1546,13 +1536,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()); @@ -1620,7 +1608,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()); @@ -1691,7 +1678,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()); @@ -1757,7 +1743,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))); @@ -1765,7 +1750,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()); @@ -1818,7 +1802,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))); @@ -1826,14 +1809,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)); @@ -1842,7 +1823,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 @@ -1908,7 +1888,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>( @@ -1926,7 +1905,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) { @@ -1971,14 +1949,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; @@ -2023,7 +1999,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)); @@ -2046,19 +2021,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))) { @@ -2069,26 +2041,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)); @@ -2099,14 +2067,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)))); @@ -2168,7 +2134,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>>; @@ -2189,7 +2154,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()); @@ -2220,7 +2184,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/coroutine b/stl/inc/coroutine index a9f8f729737..0534b6de883 100644 --- a/stl/inc/coroutine +++ b/stl/inc/coroutine @@ -238,7 +238,6 @@ 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{}; diff --git a/stl/inc/exception b/stl/inc/exception index 00e4d248869..ec798264966 100644 --- a/stl/inc/exception +++ b/stl/inc/exception @@ -313,7 +313,6 @@ _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{}); } @@ -342,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) @@ -364,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 ee4d409bbf5..fe7faf9ad1a 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -221,14 +221,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 @@ -248,7 +246,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 @@ -257,7 +254,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 @@ -1022,7 +1018,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 @@ -1035,7 +1030,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)) diff --git a/stl/inc/experimental/deque b/stl/inc/experimental/deque index 3b0bf2eb361..58851521edc 100644 --- a/stl/inc/experimental/deque +++ b/stl/inc/experimental/deque @@ -22,14 +22,12 @@ _STD_BEGIN namespace experimental { inline namespace fundamentals_v2 { - // FUNCTION TEMPLATE erase_if - template + template _DEPRECATE_EXPERIMENTAL_ERASE void erase_if(deque<_Ty, _Alloc>& _Cont, _Pr _Pred) { _Erase_remove_if(_Cont, _Pass_fn(_Pred)); } - // FUNCTION TEMPLATE erase - template + 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 0d5aa33aef0..b5e0ea46fe4 100644 --- a/stl/inc/experimental/filesystem +++ b/stl/inc/experimental/filesystem @@ -1294,7 +1294,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); 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..c9fcdc6018d 100644 --- a/stl/inc/experimental/resumable +++ b/stl/inc/experimental/resumable @@ -70,7 +70,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 4a432e8b56b..522e7c26f51 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"); @@ -2991,7 +2990,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; @@ -3034,7 +3032,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; @@ -3109,7 +3106,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 @@ -3172,7 +3168,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: @@ -3188,7 +3183,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); @@ -3214,7 +3208,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) @@ -3279,7 +3272,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; @@ -3335,7 +3327,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 @@ -3366,7 +3357,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; @@ -3401,7 +3391,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); @@ -3427,7 +3416,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( @@ -3457,7 +3445,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( @@ -3488,7 +3475,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; @@ -3500,7 +3486,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; @@ -3512,7 +3497,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)); } @@ -3522,7 +3506,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 @@ -3553,7 +3536,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; @@ -3565,7 +3547,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)); } @@ -3575,7 +3556,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)); } @@ -3585,7 +3565,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; @@ -3597,7 +3576,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)); } @@ -3606,7 +3584,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 @@ -3626,7 +3603,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, @@ -3644,7 +3620,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); @@ -3658,7 +3633,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; @@ -3687,12 +3661,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; @@ -3719,7 +3691,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); @@ -3735,7 +3706,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) { @@ -3766,7 +3736,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); @@ -3837,7 +3806,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) { @@ -3914,7 +3882,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( @@ -3957,7 +3924,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) @@ -4016,7 +3982,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 @@ -4043,7 +4008,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 (;;) { @@ -4083,7 +4047,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 @@ -4146,7 +4109,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); @@ -4182,7 +4144,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); @@ -4218,7 +4179,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/fstream b/stl/inc/fstream index 7b7f2a8098a..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; diff --git a/stl/inc/functional b/stl/inc/functional index a101f982e8c..2f13245e146 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -335,7 +335,6 @@ private: _Fn _Functor; }; -// FUNCTION TEMPLATE not1 template _CXX17_DEPRECATE_NEGATORS _NODISCARD constexpr unary_negate<_Fn> not1(const _Fn& _Func) { return unary_negate<_Fn>(_Func); @@ -358,7 +357,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); @@ -391,7 +389,6 @@ 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); @@ -421,7 +418,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); @@ -456,7 +452,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( \ @@ -525,7 +520,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); @@ -600,7 +594,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); @@ -622,7 +615,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: @@ -645,7 +637,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; }; @@ -749,7 +740,6 @@ struct _Invoker_ret<_Unforced, false> { // selected for _Rx being _Unforced } }; -// FUNCTION TEMPLATE _Test_callable template class function; @@ -1324,7 +1314,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; @@ -1383,7 +1372,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, @@ -1439,13 +1427,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)...); @@ -1476,7 +1462,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), @@ -1538,7 +1523,6 @@ public: } }; -// FUNCTION TEMPLATE bind_front template _NODISCARD constexpr auto bind_front(_Fx&& _Func, _Types&&... _Args) { static_assert(is_constructible_v, _Fx>, @@ -1758,7 +1742,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) { @@ -1820,7 +1803,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) { @@ -1863,7 +1845,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) { diff --git a/stl/inc/future b/stl/inc/future index 10ada2b9ae8..98f8ce77bff 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; @@ -1439,21 +1438,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/initializer_list b/stl/inc/initializer_list index 11a4be24c90..2714f3d3785 100644 --- a/stl/inc/initializer_list +++ b/stl/inc/initializer_list @@ -51,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..5833443c1b9 100644 --- a/stl/inc/iomanip +++ b/stl/inc/iomanip @@ -29,7 +29,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); @@ -64,7 +63,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 +89,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); @@ -133,7 +130,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 +159,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); @@ -222,7 +217,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('\\')) { diff --git a/stl/inc/iterator b/stl/inc/iterator index 173772a216c..a9900a0eced 100644 --- a/stl/inc/iterator +++ b/stl/inc/iterator @@ -64,7 +64,6 @@ 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 @@ -116,7 +115,6 @@ protected: _Container* container; }; -// FUNCTION TEMPLATE front_inserter template _NODISCARD _CONSTEXPR20 front_insert_iterator<_Container> front_inserter(_Container& _Cont) { return front_insert_iterator<_Container>(_Cont); @@ -172,7 +170,6 @@ 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); diff --git a/stl/inc/locale b/stl/inc/locale index 20667f1f9ff..838362667da 100644 --- a/stl/inc/locale +++ b/stl/inc/locale @@ -157,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 @@ -166,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/memory b/stl/inc/memory index 16569d8e6ca..3f101a2f3ba 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -108,7 +108,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, ...) @@ -192,7 +191,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, ...) @@ -247,7 +245,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, ...) @@ -393,7 +390,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 @@ -518,7 +514,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) @@ -575,7 +570,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) @@ -634,7 +628,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) @@ -709,7 +702,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) @@ -770,7 +762,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) @@ -846,7 +837,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) @@ -2745,7 +2735,6 @@ private: }; #endif // _HAS_CXX20 -// FUNCTION TEMPLATE make_shared template _NODISCARD #if _HAS_CXX20 @@ -2818,7 +2807,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; @@ -2840,7 +2828,6 @@ _NODISCARD enable_if_t, shared_ptr<_Ty>> make_shared_f } #endif // _HAS_CXX20 -// FUNCTION TEMPLATE allocate_shared template _NODISCARD #if _HAS_CXX20 @@ -2945,7 +2932,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; @@ -3414,7 +3400,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)...)); @@ -3430,7 +3415,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); @@ -3696,7 +3680,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 8ef6b98b34c..abe24eda7d8 100644 --- a/stl/inc/memory_resource +++ b/stl/inc/memory_resource @@ -32,8 +32,7 @@ _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 _Aligned_set_default_resource(memory_resource*) noexcept; extern "C" _CRT_SATELLITE_1 memory_resource* __cdecl _Unaligned_set_default_resource(memory_resource*) noexcept; inline memory_resource* set_default_resource(memory_resource* const _Resource) noexcept { @@ -46,8 +45,7 @@ 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 { + class _Identity_equal_resource : public memory_resource { protected: virtual bool do_is_equal(const memory_resource& _That) const noexcept override { return this == &_That; diff --git a/stl/inc/mutex b/stl/inc/mutex index bf70adeb6e7..6d7152c32db 100644 --- a/stl/inc/mutex +++ b/stl/inc/mutex @@ -275,20 +275,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] @@ -298,7 +295,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 */ { @@ -309,7 +305,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...>; @@ -359,7 +354,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 @@ -504,7 +498,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..4ba05d77541 100644 --- a/stl/inc/new +++ b/stl/inc/new @@ -28,7 +28,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 +50,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 a7922c238b9..98b60b77a82 100644 --- a/stl/inc/optional +++ b/stl/inc/optional @@ -655,13 +655,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)}; diff --git a/stl/inc/random b/stl/inc/random index f3b8d869b0b..ca71aef2037 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -243,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); @@ -2021,7 +2020,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). diff --git a/stl/inc/regex b/stl/inc/regex index 429f64c8978..a62a64e517b 100644 --- a/stl/inc/regex +++ b/stl/inc/regex @@ -503,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 @@ -558,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] = { @@ -1336,7 +1334,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; @@ -2069,7 +2066,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 @@ -2116,7 +2112,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 @@ -2143,7 +2138,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, @@ -2157,7 +2151,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) { @@ -2214,7 +2207,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) { @@ -2257,7 +2249,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) { @@ -2318,7 +2309,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) { diff --git a/stl/inc/scoped_allocator b/stl/inc/scoped_allocator index e134c3653a6..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 diff --git a/stl/inc/span b/stl/inc/span index 1d88b133899..b1d174b8cd2 100644 --- a/stl/inc/span +++ b/stl/inc/span @@ -674,14 +674,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/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/system_error b/stl/inc/system_error index 0626f4ed0da..ab4683ad750 100644 --- a/stl/inc/system_error +++ b/stl/inc/system_error @@ -394,7 +394,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()); } @@ -403,7 +402,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()); } diff --git a/stl/inc/tuple b/stl/inc/tuple index 8e40f941d61..a3757978c2e 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -809,7 +809,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; @@ -844,7 +843,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; @@ -881,21 +879,18 @@ 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)...); @@ -957,7 +952,6 @@ struct _View_as_tuple, _Types...> 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."); @@ -992,7 +986,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 @@ -1005,7 +998,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 diff --git a/stl/inc/type_traits b/stl/inc/type_traits index bc00bb3df75..cb1eb0422e1 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -143,7 +143,6 @@ 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; @@ -1036,7 +1035,6 @@ 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); @@ -1273,7 +1271,6 @@ struct common_type<_Ty1, _Ty2, _Rest...> : _Common_type3 class, template class> struct basic_common_reference {}; -// FUNCTION TEMPLATE _Returns_exactly template _Ty _Returns_exactly() noexcept; // not defined @@ -1442,7 +1439,6 @@ _INLINE_VAR constexpr bool _Is_specialization_v<_Template<_Types...>, _Template> template class _Template> struct _Is_specialization : bool_constant<_Is_specialization_v<_Type, _Template>> {}; -// FUNCTION TEMPLATE forward template _NODISCARD constexpr _Ty&& forward( remove_reference_t<_Ty>& _Arg) noexcept { // forward an lvalue as either an lvalue or an rvalue @@ -1455,13 +1451,11 @@ _NODISCARD constexpr _Ty&& forward(remove_reference_t<_Ty>&& _Arg) noexcept { // return static_cast<_Ty&&>(_Arg); } -// FUNCTION TEMPLATE move template _NODISCARD constexpr remove_reference_t<_Ty>&& move(_Ty&& _Arg) noexcept { // forward _Arg as movable return static_cast&&>(_Arg); } -// FUNCTION TEMPLATE move_if_noexcept template _NODISCARD constexpr conditional_t && is_copy_constructible_v<_Ty>, const _Ty&, _Ty&&> @@ -1476,7 +1470,6 @@ class reference_wrapper; // (WG21-N4842 [constexpr.functions]/1), yet both std::apply and std::visit are required to be constexpr and have // invoke-like behavior. As a result, we've chosen to apply the part of P1065R2 resolving LWG-2894 as a defect report. -// FUNCTION TEMPLATE invoke #pragma warning(push) // TRANSITION, DevCom-936696 #pragma warning(disable : 28278) // Function '%s' appears with no prototype in scope enum class _Invoker_strategy { @@ -1826,13 +1819,11 @@ struct is_pointer_interconvertible_base_of : bool_constant<__is_pointer_intercon template inline constexpr bool is_pointer_interconvertible_base_of_v = __is_pointer_interconvertible_base_of(_Base, _Derived); -// FUNCTION TEMPLATE is_pointer_interconvertible_with_class template _NODISCARD constexpr bool is_pointer_interconvertible_with_class(_MemberTy _ClassTy::*_Pm) noexcept { return __is_pointer_interconvertible_with_class(_ClassTy, _Pm); } -// FUNCTION TEMPLATE is_corresponding_member template _NODISCARD constexpr bool is_corresponding_member(_MemberTy1 _ClassTy1::*_Pm1, _MemberTy2 _ClassTy2::*_Pm2) noexcept { return __is_corresponding_member(_ClassTy1, _ClassTy2, _Pm1, _Pm2); @@ -1957,7 +1948,6 @@ template reference_wrapper(_Ty&) -> reference_wrapper<_Ty>; #endif // _HAS_CXX17 -// FUNCTION TEMPLATES ref AND cref template _NODISCARD _CONSTEXPR20 reference_wrapper<_Ty> ref(_Ty& _Val) noexcept { return reference_wrapper<_Ty>(_Val); @@ -2014,7 +2004,6 @@ struct _Is_swappable; template struct _Is_nothrow_swappable; -// FUNCTION TEMPLATE swap #if _HAS_CXX17 template && is_move_assignable_v<_Ty>, int> = 0> #else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv @@ -2209,13 +2198,11 @@ _NODISCARD size_t _Fnv1a_append_value( return _Fnv1a_append_bytes(_Val, &reinterpret_cast(_Keyval), sizeof(_Kty)); } -// FUNCTION TEMPLATE _Hash_representation template _NODISCARD size_t _Hash_representation(const _Kty& _Keyval) noexcept { // bitwise hashes the representation of a key return _Fnv1a_append_value(_FNV_offset_basis, _Keyval); } -// FUNCTION TEMPLATE _Hash_array_representation template _NODISCARD size_t _Hash_array_representation( const _Kty* const _First, const size_t _Count) noexcept { // bitwise hashes the representation of an array diff --git a/stl/inc/utility b/stl/inc/utility index 449703fff66..2635385a151 100644 --- a/stl/inc/utility +++ b/stl/inc/utility @@ -27,7 +27,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// FUNCTION TEMPLATE max template _NODISCARD constexpr const _Ty&(max) (const _Ty& _Left, const _Ty& _Right, _Pr _Pred) noexcept( noexcept(_Pred(_Left, _Right))) /* strengthened */ { @@ -51,7 +50,6 @@ _NODISCARD constexpr _Ty(max)(initializer_list<_Ty>, _Pr); // implemented in _NODISCARD constexpr _Ty(max)(initializer_list<_Ty>); // implemented in -// FUNCTION TEMPLATE min template _NODISCARD constexpr const _Ty&(min) (const _Ty& _Left, const _Ty& _Right, _Pr _Pred) noexcept( noexcept(_Pred(_Right, _Left))) /* strengthened */ { @@ -75,13 +73,11 @@ _NODISCARD constexpr _Ty(min)(initializer_list<_Ty>, _Pr); // implemented in _NODISCARD constexpr _Ty(min)(initializer_list<_Ty>); // implemented in -// FUNCTION TEMPLATE iter_swap (from ) template _CONSTEXPR20 void iter_swap(_FwdIt1 _Left, _FwdIt2 _Right) { // swap *_Left and *_Right swap(*_Left, *_Right); } -// FUNCTION TEMPLATE swap template ::value, int> _Enabled> _CONSTEXPR20 void swap(_Ty (&_Left)[_Size], _Ty (&_Right)[_Size]) noexcept(_Is_nothrow_swappable<_Ty>::value) { if (&_Left != &_Right) { @@ -106,7 +102,6 @@ _CONSTEXPR20 void swap(_Ty& _Left, _Ty& _Right) noexcept( _Right = _STD move(_Tmp); } -// FUNCTION TEMPLATE _Swap_adl template _CONSTEXPR20 void _Swap_adl(_Ty& _Left, _Ty& _Right) noexcept(_Is_nothrow_swappable<_Ty>::value) { swap(_Left, _Right); @@ -400,7 +395,6 @@ struct _Unrefwrap_helper> { // make a reference from a re template using _Unrefwrap_t = typename _Unrefwrap_helper>::type; -// FUNCTION TEMPLATE make_pair template _NODISCARD constexpr pair<_Unrefwrap_t<_Ty1>, _Unrefwrap_t<_Ty2>> make_pair(_Ty1&& _Val1, _Ty2&& _Val2) noexcept( is_nothrow_constructible_v<_Unrefwrap_t<_Ty1>, _Ty1>&& @@ -608,7 +602,6 @@ _NODISCARD constexpr const _Ty2&& get( return _STD get<1>(_STD move(_Pr)); } -// FUNCTION TEMPLATE exchange template _CONSTEXPR20 _Ty exchange(_Ty& _Val, _Other&& _New_val) noexcept( conjunction_v, is_nothrow_assignable<_Ty&, _Other>>) /* strengthened */ { @@ -618,7 +611,6 @@ _CONSTEXPR20 _Ty exchange(_Ty& _Val, _Other&& _New_val) noexcept( return _Old_val; } -// FUNCTION TEMPLATE as_const template _NODISCARD constexpr add_const_t<_Ty>& as_const(_Ty& _Val) noexcept { // view _Val through const lenses return _Val; @@ -661,7 +653,6 @@ inline constexpr bool _Is_standard_integer = is_integral_v<_Ty> #endif // __cpp_char8_t char16_t, char32_t>; -// FUNCTION TEMPLATE cmp_equal template _NODISCARD constexpr bool cmp_equal(const _Ty1 _Left, const _Ty2 _Right) noexcept { static_assert(_Is_standard_integer<_Ty1> && _Is_standard_integer<_Ty2>, @@ -675,13 +666,11 @@ _NODISCARD constexpr bool cmp_equal(const _Ty1 _Left, const _Ty2 _Right) noexcep } } -// FUNCTION TEMPLATE cmp_not_equal template _NODISCARD constexpr bool cmp_not_equal(const _Ty1 _Left, const _Ty2 _Right) noexcept { return !_STD cmp_equal(_Left, _Right); } -// FUNCTION TEMPLATE cmp_less template _NODISCARD constexpr bool cmp_less(const _Ty1 _Left, const _Ty2 _Right) noexcept { static_assert(_Is_standard_integer<_Ty1> && _Is_standard_integer<_Ty2>, @@ -695,25 +684,21 @@ _NODISCARD constexpr bool cmp_less(const _Ty1 _Left, const _Ty2 _Right) noexcept } } -// FUNCTION TEMPLATE cmp_greater template _NODISCARD constexpr bool cmp_greater(const _Ty1 _Left, const _Ty2 _Right) noexcept { return _STD cmp_less(_Right, _Left); } -// FUNCTION TEMPLATE cmp_less_equal template _NODISCARD constexpr bool cmp_less_equal(const _Ty1 _Left, const _Ty2 _Right) noexcept { return !_STD cmp_less(_Right, _Left); } -// FUNCTION TEMPLATE cmp_greater_equal template _NODISCARD constexpr bool cmp_greater_equal(const _Ty1 _Left, const _Ty2 _Right) noexcept { return !_STD cmp_less(_Left, _Right); } -// FUNCTION TEMPLATE in_range template _NODISCARD _CONSTEVAL _Ty _Min_limit() noexcept { // same as (numeric_limits<_Ty>::min)(), less throughput cost static_assert(_Is_standard_integer<_Ty>); // doesn't attempt to handle all types diff --git a/stl/inc/valarray b/stl/inc/valarray index 9cebb6d114e..b86a549c829 100644 --- a/stl/inc/valarray +++ b/stl/inc/valarray @@ -34,7 +34,6 @@ class slice_array; template class valarray; -// FUNCTION TEMPLATE _Allocate_for_op_delete template _Ty* _Allocate_for_op_delete(size_t _Count) { // allocates space for _Count objects of type _Ty diff --git a/stl/inc/vector b/stl/inc/vector index f7606618440..b219c4fdbd6 100644 --- a/stl/inc/vector +++ b/stl/inc/vector @@ -425,7 +425,6 @@ public: pointer _Myend; // pointer to end of array }; -// FUNCTION TEMPLATE _Unfancy_maybe_null template constexpr auto _Unfancy_maybe_null(_Ptrty _Ptr) noexcept { // converts from a (potentially null) fancy pointer to a plain pointer diff --git a/stl/inc/xatomic.h b/stl/inc/xatomic.h index a03ba25dde4..7377cd0f4da 100644 --- a/stl/inc/xatomic.h +++ b/stl/inc/xatomic.h @@ -90,7 +90,6 @@ enum memory_order { using _Atomic_counter_t = unsigned long; -// FUNCTION TEMPLATE _Atomic_address_as template _NODISCARD volatile _Integral* _Atomic_address_as(_Ty& _Source) noexcept { // gets a pointer to the argument as an integral type (to pass to intrinsics) diff --git a/stl/inc/xfilesystem_abi.h b/stl/inc/xfilesystem_abi.h index f0b456bd69d..1122b14984f 100644 --- a/stl/inc/xfilesystem_abi.h +++ b/stl/inc/xfilesystem_abi.h @@ -44,7 +44,6 @@ enum class __std_win_error : unsigned long { _Max = ~0UL // sentinel not used by Win32 }; -// FUNCTION __std_is_file_not_found #pragma warning(push) #pragma warning(disable : 4061) // enumerator not explicitly handled by switch label _NODISCARD inline bool __std_is_file_not_found(const __std_win_error _Error) noexcept { @@ -361,7 +360,6 @@ struct _Fs_file { } }; -// FUNCTION OBJECT _Is_slash struct _Is_slash_oper { // predicate testing if input is a preferred-separator or fallback-separator _NODISCARD constexpr bool operator()( const wchar_t _Ch) const { // test if _Ch is a preferred-separator or fallback-separator diff --git a/stl/inc/xhash b/stl/inc/xhash index ce3845be7bf..0827524ba66 100644 --- a/stl/inc/xhash +++ b/stl/inc/xhash @@ -33,7 +33,6 @@ namespace stdext { using _STD less; using _STD size_t; - // FUNCTION TEMPLATE hash_value template _NODISCARD size_t hash_value(const _Kty& _Keyval) noexcept { if constexpr (_STD is_pointer_v<_Kty> || _STD is_null_pointer_v<_Kty>) { diff --git a/stl/inc/xlocale b/stl/inc/xlocale index 38d62bfd6b6..b94091c2601 100644 --- a/stl/inc/xlocale +++ b/stl/inc/xlocale @@ -458,7 +458,6 @@ const _Facet& __CRTDECL use_facet(const locale& _Loc) { // get facet reference f _END_LOCK() } // end of use_facet body -// FUNCTION TEMPLATE _Maklocbyte template char __CRTDECL _Maklocbyte(_Elem _Char, const _Locinfo::_Cvtvec&) { // convert _Elem to char using _Cvtvec @@ -485,7 +484,6 @@ inline char __CRTDECL _Maklocbyte(unsigned short _Char, const _Locinfo::_Cvtvec& } #endif // _NATIVE_WCHAR_T_DEFINED -// FUNCTION TEMPLATE _Maklocchr template _Elem __CRTDECL _Maklocchr(char _Byte, _Elem*, const _Locinfo::_Cvtvec&) { // convert char to _Elem using _Cvtvec @@ -512,7 +510,6 @@ inline unsigned short __CRTDECL _Maklocchr(char _Byte, unsigned short*, const _L } #endif // _NATIVE_WCHAR_T_DEFINED -// FUNCTION TEMPLATE _Maklocstr template _Elem* __CRTDECL _Maklocstr(const char* _Ptr, _Elem*, const _Locinfo::_Cvtvec&) { // convert C string to _Elem sequence using _Cvtvec @@ -791,7 +788,6 @@ __PURE_APPDOMAIN_GLOBAL locale::id codecvt<_Elem, _Byte, _Statype>::id; #pragma clang diagnostic pop #endif // __clang__ -// FUNCTION TEMPLATE _Codecvt_do_length template _NODISCARD int _Codecvt_do_length( const _CvtTy& _Cvt, _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) { @@ -3225,7 +3221,6 @@ protected: virtual __CLR_OR_THIS_CALL ~ctype_byname() noexcept {} }; -// FUNCTION TEMPLATE _Getloctxt enum class _Case_sensitive : bool { _Nope, _Yes }; template diff --git a/stl/inc/xlocinfo b/stl/inc/xlocinfo index 14527cba8e9..055f9fd3474 100644 --- a/stl/inc/xlocinfo +++ b/stl/inc/xlocinfo @@ -46,7 +46,6 @@ _EXTERN_C_UNLESS_PURE #define _M_MESSAGES _CATMASK(_X_MESSAGES) #define _M_ALL (_CATMASK(_NCAT) - 1) -// FUNCTION DECLARATIONS _CRTIMP2_PURE _Collvec __CLRCALL_PURE_OR_CDECL _Getcoll(); _CRTIMP2_PURE _Ctypevec __CLRCALL_PURE_OR_CDECL _Getctype(); _CRTIMP2_PURE _Cvtvec __CLRCALL_PURE_OR_CDECL _Getcvt(); @@ -402,7 +401,6 @@ private: _Yarn _Newlocname; // new locale name for this object }; -// FUNCTION TEMPLATE _LStrcoll template int __CRTDECL _LStrcoll(const _Elem* _First1, const _Elem* _Last1, const _Elem* _First2, const _Elem* _Last2, const _Locinfo::_Collvec*) { // perform locale-specific comparison of _Elem sequences @@ -430,7 +428,6 @@ inline int __CRTDECL _LStrcoll(const wchar_t* _First1, const wchar_t* _Last1, co return _Wcscoll(_First1, _Last1, _First2, _Last2, _Vector); } -// FUNCTION TEMPLATE _LStrxfrm template size_t __CRTDECL _LStrxfrm(_Elem* _First1, _Elem* _Last1, const _Elem* _First2, const _Elem* _Last2, const _Locinfo::_Collvec*) { // perform locale-specific transform of _Elems [_First1, _Last1) diff --git a/stl/inc/xlocnum b/stl/inc/xlocnum index 2a14d6f3ef1..b14cb570339 100644 --- a/stl/inc/xlocnum +++ b/stl/inc/xlocnum @@ -45,7 +45,6 @@ _END_EXTERN_C_UNLESS_PURE _STD_BEGIN -// FUNCTION _Stodx_v2 inline double _Stodx_v2(const char* _Str, char** _Endptr, int _Pten, int* _Perr) { // convert string to double int& _Errno_ref = errno; // Nonzero cost, pay it once const int _Orig = _Errno_ref; @@ -62,7 +61,6 @@ inline double _Stodx_v2(const char* _Str, char** _Endptr, int _Pten, int* _Perr) return _Val; } -// FUNCTION _Stofx_v2 inline float _Stofx_v2(const char* _Str, char** _Endptr, int _Pten, int* _Perr) { // convert string to float int& _Errno_ref = errno; // Nonzero cost, pay it once const int _Orig = _Errno_ref; @@ -79,7 +77,6 @@ inline float _Stofx_v2(const char* _Str, char** _Endptr, int _Pten, int* _Perr) return _Val; } -// FUNCTION TEMPLATE _Find_elem template size_t _Find_elem(const _Elem (&_Base)[_Base_size], const _Elem _Ch) { // lookup _Ch in array storing NUL-terminated string _Base @@ -1159,7 +1156,6 @@ struct _Hex_float_precision { static constexpr int value = ((LDBL_MANT_DIG - 1) + 3) / 4; }; -// FUNCTION TEMPLATE _Float_put_desired_precision template int _Float_put_desired_precision(const streamsize _Precision, const ios_base::fmtflags _Float_flags) { const bool _Is_hex = _Float_flags == (ios_base::fixed | ios_base::scientific); diff --git a/stl/inc/xmemory b/stl/inc/xmemory index 098c25ceeec..62f4e8919fe 100644 --- a/stl/inc/xmemory +++ b/stl/inc/xmemory @@ -54,7 +54,6 @@ template _INLINE_VAR constexpr bool _Nothrow_compare = noexcept( static_cast(_STD declval()(_STD declval(), _STD declval()))); -// FUNCTION TEMPLATE _Get_size_of_n template _NODISCARD constexpr size_t _Get_size_of_n(const size_t _Count) { constexpr bool _Overflow_is_possible = _Ty_size > 1; @@ -129,7 +128,6 @@ constexpr size_t _Big_allocation_sentinel = 0xFAFAFAFAFAFAFAFAULL; constexpr size_t _Big_allocation_sentinel = 0xFAFAFAFAUL; #endif // _WIN64 -// FUNCTION _Allocate_manually_vector_aligned template __declspec(allocator) void* _Allocate_manually_vector_aligned(const size_t _Bytes) { // allocate _Bytes manually aligned to at least _Big_allocation_alignment @@ -149,7 +147,6 @@ __declspec(allocator) void* _Allocate_manually_vector_aligned(const size_t _Byte return _Ptr; } -// FUNCTION TEMPLATE _Adjust_manually_vector_aligned inline void _Adjust_manually_vector_aligned(void*& _Ptr, size_t& _Bytes) { // adjust parameters from _Allocate_manually_vector_aligned to pass to operator delete _Bytes += _Non_user_size; @@ -174,7 +171,6 @@ inline void _Adjust_manually_vector_aligned(void*& _Ptr, size_t& _Bytes) { } #endif // defined(_M_IX86) || defined(_M_X64) -// FUNCTION TEMPLATES _Allocate and _Deallocate #ifdef __cpp_aligned_new template __STDCPP_DEFAULT_NEW_ALIGNMENT__), int> = 0> @@ -267,7 +263,6 @@ _CONSTEXPR20 void _Deallocate(void* _Ptr, size_t _Bytes) noexcept { #undef _HAS_ALIGNED_NEW -// FUNCTION TEMPLATE _Global_new template _Ty* _Global_new(_Types&&... _Args) { // acts as "new" while disallowing user overload selection struct _NODISCARD _Guard_type { @@ -288,7 +283,6 @@ _Ty* _Global_new(_Types&&... _Args) { // acts as "new" while disallowing user ov template using _Rebind_pointer_t = typename pointer_traits<_Ptr>::template rebind<_Ty>; -// FUNCTION TEMPLATE _Refancy template , int> = 0> _CONSTEXPR20 _Pointer _Refancy(typename pointer_traits<_Pointer>::element_type* _Ptr) noexcept { return pointer_traits<_Pointer>::pointer_to(*_Ptr); @@ -299,7 +293,6 @@ _CONSTEXPR20 _Pointer _Refancy(_Pointer _Ptr) noexcept { return _Ptr; } -// FUNCTION TEMPLATE _Destroy_in_place template _CONSTEXPR20 void _Destroy_range(_NoThrowFwdIt _First, _NoThrowSentinel _Last) noexcept; @@ -313,7 +306,6 @@ _CONSTEXPR20 void _Destroy_in_place(_Ty& _Obj) noexcept { } #if _HAS_CXX17 -// FUNCTION TEMPLATE destroy_at template _CONSTEXPR20 void destroy_at(_Ty* const _Location) noexcept /* strengthened */ { #if _HAS_CXX20 @@ -327,7 +319,6 @@ _CONSTEXPR20 void destroy_at(_Ty* const _Location) noexcept /* strengthened */ { } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE _Const_cast template auto _Const_cast(_Ptrty _Ptr) noexcept { // remove constness from a fancy pointer using _Elem = typename pointer_traits<_Ptrty>::element_type; @@ -911,7 +902,6 @@ using _Alloc_ptr_t = typename allocator_traits<_Alloc>::pointer; template using _Alloc_size_t = typename allocator_traits<_Alloc>::size_type; -// FUNCTION TEMPLATE _Pocca template _CONSTEXPR20 void _Pocca(_Alloc& _Left, const _Alloc& _Right) noexcept { if constexpr (allocator_traits<_Alloc>::propagate_on_container_copy_assignment::value) { @@ -919,7 +909,6 @@ _CONSTEXPR20 void _Pocca(_Alloc& _Left, const _Alloc& _Right) noexcept { } } -// FUNCTION TEMPLATE _Pocma template _CONSTEXPR20 void _Pocma(_Alloc& _Left, _Alloc& _Right) noexcept { // (maybe) propagate on container move assignment if constexpr (allocator_traits<_Alloc>::propagate_on_container_move_assignment::value) { @@ -927,7 +916,6 @@ _CONSTEXPR20 void _Pocma(_Alloc& _Left, _Alloc& _Right) noexcept { // (maybe) pr } } -// FUNCTION TEMPLATE _Pocs template _CONSTEXPR20 void _Pocs(_Alloc& _Left, _Alloc& _Right) noexcept { if constexpr (allocator_traits<_Alloc>::propagate_on_container_swap::value) { @@ -937,7 +925,6 @@ _CONSTEXPR20 void _Pocs(_Alloc& _Left, _Alloc& _Right) noexcept { } } -// FUNCTION TEMPLATE _Destroy_range WITH ALLOC template _CONSTEXPR20 void _Destroy_range(_Alloc_ptr_t<_Alloc> _First, const _Alloc_ptr_t<_Alloc> _Last, _Alloc& _Al) noexcept { // note that this is an optimization for debug mode codegen; in release mode the BE removes all of this @@ -949,7 +936,6 @@ _CONSTEXPR20 void _Destroy_range(_Alloc_ptr_t<_Alloc> _First, const _Alloc_ptr_t } } -// FUNCTION TEMPLATE _Destroy_range template _CONSTEXPR20 void _Destroy_range(_NoThrowFwdIt _First, const _NoThrowSentinel _Last) noexcept { // note that this is an optimization for debug mode codegen; in release mode the BE removes all of this @@ -960,7 +946,6 @@ _CONSTEXPR20 void _Destroy_range(_NoThrowFwdIt _First, const _NoThrowSentinel _L } } -// FUNCTION TEMPLATE _Convert_size template _NODISCARD constexpr _Size_type _Convert_size(const size_t _Len) noexcept { // convert size_t to _Size_type, avoiding truncation @@ -977,7 +962,6 @@ _NODISCARD constexpr size_t _Convert_size(const size_t _Len) noexcept { return _Len; } -// FUNCTION TEMPLATE _Deallocate_plain template _CONSTEXPR20 void _Deallocate_plain(_Alloc& _Al, typename _Alloc::value_type* const _Ptr) noexcept { // deallocate a plain pointer using an allocator @@ -990,7 +974,6 @@ _CONSTEXPR20 void _Deallocate_plain(_Alloc& _Al, typename _Alloc::value_type* co } } -// FUNCTION TEMPLATE _Delete_plain_internal template _CONSTEXPR20 void _Delete_plain_internal(_Alloc& _Al, typename _Alloc::value_type* const _Ptr) noexcept { // destroy *_Ptr in place, then deallocate _Ptr using _Al; used for internal container types the user didn't name @@ -1406,7 +1389,6 @@ struct _Move_allocator_tag { explicit _Move_allocator_tag() = default; }; -// FUNCTION TEMPLATE _Get_temporary_buffer template pair<_Ty*, ptrdiff_t> _Get_temporary_buffer(ptrdiff_t _Count) noexcept { if (static_cast(_Count) <= static_cast(-1) / sizeof(_Ty)) { @@ -1431,7 +1413,6 @@ pair<_Ty*, ptrdiff_t> _Get_temporary_buffer(ptrdiff_t _Count) noexcept { return {nullptr, 0}; } -// FUNCTION TEMPLATE _Return_temporary_buffer template void _Return_temporary_buffer(_Ty* const _Pbuf) noexcept { #ifdef __cpp_aligned_new @@ -1475,7 +1456,6 @@ struct _NODISCARD _Uninitialized_backout { } }; -// FUNCTION TEMPLATE _Uninitialized_move_unchecked template _CONSTEXPR20 _NoThrowFwdIt _Uninitialized_move_unchecked(_InIt _First, const _InIt _Last, _NoThrowFwdIt _Dest) { // move [_First, _Last) to raw [_Dest, ...) @@ -1607,8 +1587,7 @@ namespace ranges { template using uninitialized_move_result = in_out_result<_In, _Out>; - // FUNCTION TEMPLATE _Uninitialized_move_unchecked - // clang-format off + // clang-format off template _Se, _No_throw_forward_iterator _Out, _No_throw_sentinel_for<_Out> _OSe> requires constructible_from, iter_rvalue_reference_t<_It>> @@ -1675,7 +1654,6 @@ private: _Alloc& _Al; }; -// FUNCTION TEMPLATE _Uninitialized_copy WITH ALLOCATOR template _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_copy( const _InIt _First, const _InIt _Last, _Alloc_ptr_t<_Alloc> _Dest, _Alloc& _Al) { @@ -1706,7 +1684,6 @@ _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_copy( return _Backout._Release(); } -// FUNCTION TEMPLATE uninitialized_copy template _CONSTEXPR20 _NoThrowFwdIt _Uninitialized_copy_unchecked(_InIt _First, const _InIt _Last, _NoThrowFwdIt _Dest) { // copy [_First, _Last) to raw [_Dest, ...) @@ -1738,7 +1715,6 @@ _NoThrowFwdIt uninitialized_copy(const _InIt _First, const _InIt _Last, _NoThrow return _Dest; } -// FUNCTION TEMPLATE _Uninitialized_move WITH ALLOCATOR template _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_move( const _InIt _First, const _InIt _Last, _Alloc_ptr_t<_Alloc> _Dest, _Alloc& _Al) { @@ -1766,7 +1742,6 @@ _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_move( return _Backout._Release(); } -// FUNCTION TEMPLATE _Uninitialized_fill_n WITH ALLOCATOR template _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_fill_n( _Alloc_ptr_t<_Alloc> _First, _Alloc_size_t<_Alloc> _Count, const typename _Alloc::value_type& _Val, _Alloc& _Al) { @@ -1800,7 +1775,6 @@ _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_fill_n( return _Backout._Release(); } -// FUNCTION TEMPLATE uninitialized_fill template void uninitialized_fill(const _NoThrowFwdIt _First, const _NoThrowFwdIt _Last, const _Tval& _Val) { // copy _Val throughout raw [_First, _Last) @@ -1826,7 +1800,6 @@ void uninitialized_fill(const _NoThrowFwdIt _First, const _NoThrowFwdIt _Last, c } } -// FUNCTION TEMPLATE _Uninitialized_value_construct_n WITH ALLOCATOR template _INLINE_VAR constexpr bool _Use_memset_value_construct_v = conjunction_v>, is_scalar<_Iter_value_t<_NoThrowFwdIt>>, @@ -1882,13 +1855,11 @@ _NoThrowFwdIt _Uninitialized_value_construct_n_unchecked1(_NoThrowFwdIt _UFirst, } #if _HAS_DEPRECATED_TEMPORARY_BUFFER -// FUNCTION TEMPLATE get_temporary_buffer template _CXX17_DEPRECATE_TEMPORARY_BUFFER _NODISCARD pair<_Ty*, ptrdiff_t> get_temporary_buffer(ptrdiff_t _Count) noexcept { return _Get_temporary_buffer<_Ty>(_Count); } -// FUNCTION TEMPLATE return_temporary_buffer template _CXX17_DEPRECATE_TEMPORARY_BUFFER void return_temporary_buffer(_Ty* _Pbuf) { _Return_temporary_buffer(_Pbuf); @@ -2005,7 +1976,6 @@ _NODISCARD constexpr bool _Allocators_equal(const _Alloc& _Lhs, const _Alloc& _R } } -// FUNCTION TEMPLATE remove template _NODISCARD _CONSTEXPR20 _FwdIt remove(_FwdIt _First, const _FwdIt _Last, const _Ty& _Val) { // remove each matching _Val @@ -2027,7 +1997,6 @@ _NODISCARD _CONSTEXPR20 _FwdIt remove(_FwdIt _First, const _FwdIt _Last, const _ return _First; } -// FUNCTION TEMPLATE remove_if template _NODISCARD _CONSTEXPR20 _FwdIt remove_if(_FwdIt _First, const _FwdIt _Last, _Pr _Pred) { // remove each satisfying _Pred @@ -2049,7 +2018,6 @@ _NODISCARD _CONSTEXPR20 _FwdIt remove_if(_FwdIt _First, const _FwdIt _Last, _Pr return _First; } -// FUNCTION TEMPLATE _Erase_remove template _CONSTEXPR20 typename _Container::size_type _Erase_remove(_Container& _Cont, const _Uty& _Val) { // erase each element matching _Val @@ -2061,7 +2029,6 @@ _CONSTEXPR20 typename _Container::size_type _Erase_remove(_Container& _Cont, con return _Old_size - _Cont.size(); } -// FUNCTION TEMPLATE _Erase_remove_if template _CONSTEXPR20 typename _Container::size_type _Erase_remove_if(_Container& _Cont, _Pr _Pred) { // erase each element satisfying _Pred @@ -2073,7 +2040,6 @@ _CONSTEXPR20 typename _Container::size_type _Erase_remove_if(_Container& _Cont, return _Old_size - _Cont.size(); } -// FUNCTION TEMPLATE _Erase_nodes_if template typename _Container::size_type _Erase_nodes_if(_Container& _Cont, _Pr _Pred) { // erase each element satisfying _Pred diff --git a/stl/inc/xpolymorphic_allocator.h b/stl/inc/xpolymorphic_allocator.h index 00ecb3996b5..8ca32dc39f9 100644 --- a/stl/inc/xpolymorphic_allocator.h +++ b/stl/inc/xpolymorphic_allocator.h @@ -23,7 +23,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN #if !_HAS_CXX20 -// FUNCTION TEMPLATE _Uses_allocator_construct template void _Uses_allocator_construct2( true_type, _Ty* const _Ptr, _Outer_alloc& _Outer, _Inner_alloc& _Inner, _Types&&... _Args) { @@ -175,7 +174,6 @@ namespace pmr { } #endif // !_HAS_CXX20 - // FUNCTION get_default_resource extern "C" _CRT_SATELLITE_1 memory_resource* __cdecl _Aligned_get_default_resource() noexcept; extern "C" _CRT_SATELLITE_1 memory_resource* __cdecl _Unaligned_get_default_resource() noexcept; diff --git a/stl/inc/xstddef b/stl/inc/xstddef index f02f0e3a361..4acb75d410a 100644 --- a/stl/inc/xstddef +++ b/stl/inc/xstddef @@ -26,7 +26,6 @@ template // false value attached to a dependent name (for static_assert) _INLINE_VAR constexpr bool _Always_false = false; -// FUNCTIONAL STUFF (from ) #if _HAS_AUTO_PTR_ETC // STRUCT TEMPLATE unary_function template @@ -269,7 +268,6 @@ struct less_equal { using is_transparent = int; }; -// FUNCTION TEMPLATE addressof template _NODISCARD constexpr _Ty* addressof(_Ty& _Val) noexcept { return __builtin_addressof(_Val); @@ -278,7 +276,6 @@ _NODISCARD constexpr _Ty* addressof(_Ty& _Val) noexcept { template const _Ty* addressof(const _Ty&&) = delete; -// FUNCTION TEMPLATE _Unfancy template _NODISCARD constexpr auto _Unfancy(_Ptrty _Ptr) noexcept { // converts from a fancy pointer to a plain pointer return _STD addressof(*_Ptr); diff --git a/stl/inc/xstring b/stl/inc/xstring index c137476f945..5878cfd61a8 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -1726,7 +1726,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATES operator== FOR basic_string_view template _NODISCARD constexpr bool operator==( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1748,7 +1747,6 @@ _NODISCARD constexpr bool operator==( } #if !_HAS_CXX20 -// FUNCTION TEMPLATES operator!= FOR basic_string_view template _NODISCARD constexpr bool operator!=( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1768,7 +1766,6 @@ _NODISCARD constexpr bool operator!=( } -// FUNCTION TEMPLATES operator< FOR basic_string_view template _NODISCARD constexpr bool operator<( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1788,7 +1785,6 @@ _NODISCARD constexpr bool operator<( } -// FUNCTION TEMPLATES operator> FOR basic_string_view template _NODISCARD constexpr bool operator>( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1808,7 +1804,6 @@ _NODISCARD constexpr bool operator>( } -// FUNCTION TEMPLATES operator<= FOR basic_string_view template _NODISCARD constexpr bool operator<=( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1828,7 +1823,6 @@ _NODISCARD constexpr bool operator<=( } -// FUNCTION TEMPLATES operator>= FOR basic_string_view template _NODISCARD constexpr bool operator>=( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { diff --git a/stl/inc/xtr1common b/stl/inc/xtr1common index b7b3ef44eb9..3624ea8a7c4 100644 --- a/stl/inc/xtr1common +++ b/stl/inc/xtr1common @@ -176,7 +176,6 @@ _INLINE_VAR constexpr bool _Is_any_of_v = // true if and only if _Ty is in _Type disjunction_v...>; #if _HAS_CXX20 -// FUNCTION is_constant_evaluated _NODISCARD constexpr bool is_constant_evaluated() noexcept { return __builtin_is_constant_evaluated(); } diff --git a/stl/inc/xutility b/stl/inc/xutility index 423824d8e50..b9a6c8bd95c 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -59,7 +59,6 @@ _END_EXTERN_C _STD_BEGIN -// FUNCTION TEMPLATE _Bit_cast template , is_trivially_copyable<_To>, is_trivially_copyable<_From>>, @@ -125,7 +124,6 @@ struct _Get_rebind_alias<_Ty, _Other, void_t; }; -// FUNCTION TEMPLATE _Voidify_iter template _NODISCARD constexpr void* _Voidify_iter(_Iter _It) noexcept { if constexpr (is_pointer_v<_Iter>) { @@ -135,7 +133,6 @@ _NODISCARD constexpr void* _Voidify_iter(_Iter _It) noexcept { } } -// FUNCTION TEMPLATE construct_at #if _HAS_CXX20 template ()) _Ty(_STD declval<_Types>()...))>> @@ -145,7 +142,6 @@ constexpr _Ty* construct_at(_Ty* const _Location, _Types&&... _Args) noexcept( } #endif // _HAS_CXX20 -// FUNCTION TEMPLATE _Construct_in_place template _CONSTEXPR20 void _Construct_in_place(_Ty& _Obj, _Types&&... _Args) noexcept( is_nothrow_constructible_v<_Ty, _Types...>) { @@ -159,7 +155,6 @@ _CONSTEXPR20 void _Construct_in_place(_Ty& _Obj, _Types&&... _Args) noexcept( } } -// FUNCTION TEMPLATE _Default_construct_in_place template void _Default_construct_in_place(_Ty& _Obj) noexcept(is_nothrow_default_constructible_v<_Ty>) { ::new (_Voidify_iter(_STD addressof(_Obj))) _Ty; @@ -199,7 +194,6 @@ struct pointer_traits<_Ty*> { }; #if _HAS_CXX20 -// FUNCTION TEMPLATE to_address template inline constexpr bool _Has_to_address_v = false; // determines whether _Ptr has pointer_traits<_Ptr>::to_address(p) @@ -234,7 +228,6 @@ struct identity { }; #endif // _HAS_CXX20 -// FUNCTION TEMPLATE _Pass_fn // TRANSITION, VSO-386225 template struct _Ref_fn { // pass function object by value as a reference @@ -1283,7 +1276,6 @@ _INLINE_VAR constexpr bool _Is_random_iter_v = is_convertible_v<_Iter_cat_t<_Ite template struct _Is_checked_helper {}; // default definition, no longer used, retained due to pseudo-documentation -// FUNCTION TEMPLATE _Adl_verify_range #if _ITERATOR_DEBUG_LEVEL != 0 template constexpr void _Verify_range(const _Ty* const _First, const _Ty* const _Last) noexcept { @@ -1315,7 +1307,6 @@ constexpr void _Adl_verify_range(const _Iter& _First, const _Sentinel& _Last) { } } -// FUNCTION TEMPLATE _Get_unwrapped template _INLINE_VAR constexpr bool _Unwrappable_v = false; @@ -1339,7 +1330,6 @@ _NODISCARD constexpr decltype(auto) _Get_unwrapped(_Iter&& _It) { template using _Unwrapped_t = _Remove_cvref_t()))>; -// FUNCTION TEMPLATE _Get_unwrapped_unverified template _INLINE_VAR constexpr bool _Do_unwrap_when_unverified_v = false; @@ -1367,7 +1357,6 @@ _NODISCARD constexpr decltype(auto) _Get_unwrapped_unverified(_Iter&& _It) { template using _Unwrapped_unverified_t = _Remove_cvref_t()))>; -// FUNCTION TEMPLATE _Get_unwrapped_n struct _Distance_unknown { constexpr _Distance_unknown operator-() const noexcept { return {}; @@ -1418,7 +1407,6 @@ _NODISCARD constexpr decltype(auto) _Get_unwrapped_n(_Iter&& _It, const _Diff _O } } -// FUNCTION TEMPLATE _Seek_wrapped template _INLINE_VAR constexpr bool _Wrapped_seekable_v = false; @@ -1475,7 +1463,6 @@ using _Enable_if_execution_policy_t = typename remove_reference_t<_ExPo>::_Stand #endif // _HAS_CXX17 -// FUNCTION TEMPLATE _Idl_distance template _NODISCARD constexpr auto _Idl_distance(const _Iter& _First, const _Iter& _Last) { // tries to get the distance between _First and _Last if they are random-access iterators @@ -1513,7 +1500,6 @@ using _Unwrap_enum_t = typename _Unwrap_enum<_Elem>::type; #define _DEBUG_ORDER_SET_UNWRAPPED(otherIter, first, last, pred) \ _Debug_order_set_unchecked(first, last, pred) -// FUNCTION TEMPLATE _Debug_lt_pred template , _Remove_cvref_t<_Ty2>>, int> = 0> constexpr bool _Debug_lt_pred(_Pr&& _Pred, _Ty1&& _Left, _Ty2&& _Right) noexcept( @@ -1534,7 +1520,6 @@ constexpr bool _Debug_lt_pred(_Pr&& _Pred, _Ty1&& _Left, _Ty2&& _Right) noexcept return static_cast(_Pred(_Left, _Right)); } -// FUNCTION TEMPLATE _Debug_order_unchecked template constexpr void _Debug_order_unchecked(_InIt _First, _Sentinel _Last, _Pr&& _Pred) { // test if range is ordered by predicate @@ -1547,7 +1532,6 @@ constexpr void _Debug_order_unchecked(_InIt _First, _Sentinel _Last, _Pr&& _Pred } } -// FUNCTION TEMPLATE _Debug_order_set_unchecked template constexpr void _Debug_order_set_unchecked(_InIt _First, _InIt _Last, _Pr&& _Pred) { // test if range is ordered by predicate @@ -1558,7 +1542,6 @@ constexpr void _Debug_order_set_unchecked(_InIt _First, _InIt _Last, _Pr&& _Pred #endif // _ITERATOR_DEBUG_LEVEL < 2 // MORE ITERATOR STUFF (from ) -// FUNCTION TEMPLATE advance template _CONSTEXPR17 void advance(_InIt& _Where, _Diff _Off) { // increment iterator by offset if constexpr (_Is_random_iter_v<_InIt>) { @@ -1587,7 +1570,6 @@ _CONSTEXPR17 void advance(_InIt& _Where, _Diff _Off) { // increment iterator by } } -// FUNCTION TEMPLATE distance template _NODISCARD _CONSTEXPR17 _Iter_diff_t<_InIt> distance(_InIt _First, _InIt _Last) { if constexpr (_Is_random_iter_v<_InIt>) { @@ -1605,13 +1587,11 @@ _NODISCARD _CONSTEXPR17 _Iter_diff_t<_InIt> distance(_InIt _First, _InIt _Last) } } -// FUNCTION TEMPLATE _Next_iter template constexpr _InIt _Next_iter(_InIt _First) { // increment iterator return ++_First; } -// FUNCTION TEMPLATE next template _NODISCARD _CONSTEXPR17 _InIt next(_InIt _First, _Iter_diff_t<_InIt> _Off = 1) { // increment iterator static_assert(_Is_input_iter_v<_InIt>, "next requires input iterator"); @@ -1620,13 +1600,11 @@ _NODISCARD _CONSTEXPR17 _InIt next(_InIt _First, _Iter_diff_t<_InIt> _Off = 1) { return _First; } -// FUNCTION TEMPLATE _Prev_iter template constexpr _BidIt _Prev_iter(_BidIt _First) { // decrement iterator return --_First; } -// FUNCTION TEMPLATE prev template _NODISCARD _CONSTEXPR17 _BidIt prev(_BidIt _First, _Iter_diff_t<_BidIt> _Off = 1) { // decrement iterator static_assert(_Is_bidi_iter_v<_BidIt>, "prev requires bidirectional iterator"); @@ -1899,7 +1877,6 @@ _NODISCARD _CONSTEXPR17 reverse_iterator<_BidIt> operator+( return _Right + _Off; } -// FUNCTION TEMPLATE make_reverse_iterator template _NODISCARD _CONSTEXPR17 reverse_iterator<_BidIt> make_reverse_iterator(_BidIt _Iter) noexcept( is_nothrow_move_constructible_v<_BidIt>) /* strengthened */ { @@ -1914,7 +1891,6 @@ inline constexpr bool disable_sized_sentinel_for, reve // clang-format on #endif // __cpp_lib_concepts -// FUNCTION TEMPLATES begin AND end template _NODISCARD _CONSTEXPR17 auto begin(_Container& _Cont) -> decltype(_Cont.begin()) { return _Cont.begin(); @@ -1945,7 +1921,6 @@ _NODISCARD constexpr _Ty* end(_Ty (&_Array)[_Size]) noexcept { return _Array + _Size; } -// FUNCTION TEMPLATES cbegin AND cend template _NODISCARD constexpr auto cbegin(const _Container& _Cont) noexcept(noexcept(_STD begin(_Cont))) -> decltype(_STD begin(_Cont)) { @@ -1958,7 +1933,6 @@ _NODISCARD constexpr auto cend(const _Container& _Cont) noexcept(noexcept(_STD e return _STD end(_Cont); } -// FUNCTION TEMPLATES rbegin AND rend template _NODISCARD _CONSTEXPR17 auto rbegin(_Container& _Cont) -> decltype(_Cont.rbegin()) { return _Cont.rbegin(); @@ -1999,7 +1973,6 @@ _NODISCARD _CONSTEXPR17 reverse_iterator rend(initializer_list<_El return reverse_iterator(_Ilist.begin()); } -// FUNCTION TEMPLATES crbegin AND crend template _NODISCARD _CONSTEXPR17 auto crbegin(const _Container& _Cont) -> decltype(_STD rbegin(_Cont)) { return _STD rbegin(_Cont); @@ -2021,7 +1994,6 @@ _NODISCARD constexpr size_t size(const _Ty (&)[_Size]) noexcept { } #if _HAS_CXX20 -// FUNCTION TEMPLATE ssize template _NODISCARD constexpr auto ssize(const _Container& _Cont) -> common_type_t> { @@ -2071,7 +2043,6 @@ _NODISCARD constexpr const _Elem* data(initializer_list<_Elem> _Ilist) noexcept } #ifdef __cpp_lib_concepts -// FUNCTION TEMPLATE _Fake_decay_copy template _NODISCARD _Ty _Fake_decay_copy(_Ty) noexcept; // _Fake_decay_copy(E): @@ -3143,8 +3114,7 @@ namespace ranges { inline constexpr _Prev_fn prev{_Not_quite_object::_Construct_tag{}}; - // FUNCTION TEMPLATE _Find_last_iterator - template _Se> + template _Se> _NODISCARD constexpr _It _Find_last_iterator( const _It& _First, const _Se& _Last, const iter_difference_t<_It> _Count) { // Find the iterator in [_First, _Last) (of length _Count) which equals _Last @@ -4028,7 +3998,6 @@ _NODISCARD _CONSTEXPR17 move_iterator<_Iter> operator+( #endif // __cpp_lib_concepts { return move_iterator<_Iter>{_Right.base() + _Off}; } -// FUNCTION TEMPLATE make_move_iterator template _NODISCARD _CONSTEXPR17 move_iterator<_Iter> make_move_iterator(_Iter _It) { // make move_iterator from iterator return move_iterator<_Iter>(_STD move(_It)); @@ -4088,7 +4057,6 @@ template _INLINE_VAR constexpr bool _Iterators_are_contiguous = _Iterator_is_contiguous<_Iter1>&& _Iterator_is_contiguous<_Iter2>; -// FUNCTION TEMPLATE copy template struct _Ptr_cat_helper { using _USource = _Unwrap_enum_t<_Source>; @@ -4300,7 +4268,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE copy_n template _CONSTEXPR20 _OutIt copy_n(_InIt _First, _Diff _Count_raw, _OutIt _Dest) { // copy [_First, _First + _Count) to [_Dest, ...) @@ -4348,7 +4315,6 @@ _FwdIt2 copy_n(_ExPo&&, _FwdIt1 _First, _Diff _Count_raw, _FwdIt2 _Dest) noexcep } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE copy_backward template _CtgIt2 _Copy_backward_memmove(_CtgIt1 _First, _CtgIt1 _Last, _CtgIt2 _Dest) { // implement copy_backward-like function as memmove @@ -4411,7 +4377,6 @@ _BidIt2 copy_backward(_ExPo&&, _BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) noe } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE move template _CONSTEXPR20 _OutIt _Move_unchecked(_InIt _First, _InIt _Last, _OutIt _Dest) { // move [_First, _Last) to [_Dest, ...) @@ -4454,7 +4419,6 @@ _FwdIt2 move(_ExPo&&, _FwdIt1 _First, _FwdIt1 _Last, _FwdIt2 _Dest) noexcept /* } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE move_backward template _CONSTEXPR20 _BidIt2 _Move_backward_unchecked(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) { // move [_First, _Last) backwards to [..., _Dest) @@ -4495,7 +4459,6 @@ _BidIt2 move_backward(_ExPo&&, _BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) noe } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE fill template struct _Is_character : false_type {}; // by default, not a character type @@ -4606,7 +4569,6 @@ void fill(_ExPo&&, _FwdIt _First, _FwdIt _Last, const _Ty& _Val) noexcept /* ter } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE fill_n template _CONSTEXPR20 _OutIt fill_n(_OutIt _Dest, const _Diff _Count_raw, const _Ty& _Val) { // copy _Val _Count times through [_Dest, ...) @@ -4695,7 +4657,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE equal // _Can_memcmp_elements<_Elem1, _Elem2> reports whether `_Elem1 == _Elem2` can be optimized to memcmp. // Here, _Elem1 and _Elem2 aren't top-level const, because we remove_const_t before using _Can_memcmp_elements. @@ -4896,8 +4857,7 @@ _NODISCARD bool equal(_ExPo&& _Exec, const _FwdIt1 _First1, const _FwdIt1 _Last1 #ifdef __cpp_lib_concepts namespace ranges { - // FUNCTION TEMPLATE _Rewrap_iterator - template + template _NODISCARD constexpr iterator_t<_Rng> _Rewrap_iterator(_Rng&& _Range, _It&& _Val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v, _Unwrapped_t>>); @@ -5024,7 +4984,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE lexicographical_compare template struct _Lex_compare_check_element_types_helper : bool_constant< @@ -5173,7 +5132,6 @@ _NODISCARD bool lexicographical_compare( #endif // _HAS_CXX17 #ifdef __cpp_lib_concepts -// FUNCTION TEMPLATE lexicographical_compare_three_way template _NODISCARD constexpr auto lexicographical_compare_three_way( _InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _InIt2 _Last2, _Cmp _Comp) -> decltype(_Comp(*_First1, *_First2)) { @@ -5232,7 +5190,6 @@ _NODISCARD constexpr auto lexicographical_compare_three_way( } #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE find template _NODISCARD constexpr bool _Within_limits(const _Ty& _Val, true_type, true_type, _Any_tag, false_type) { // signed _Elem, signed _Ty @@ -5446,7 +5403,6 @@ namespace ranges { } // namespace ranges #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE count template _NODISCARD _CONSTEXPR20 _Iter_diff_t<_InIt> count(const _InIt _First, const _InIt _Last, const _Ty& _Val) { // count elements that match _Val @@ -5474,7 +5430,6 @@ _NODISCARD _Iter_diff_t<_FwdIt> count( _ExPo&& _Exec, const _FwdIt _First, const _FwdIt _Last, const _Ty& _Val) noexcept; // terminates #endif // _HAS_CXX17 -// FUNCTION TEMPLATE _Check_match_counts template _NODISCARD constexpr _InIt _Find_pr(_InIt _First, const _InIt _Last, const _Ty& _Val, _Pr _Pred) { for (; _First != _Last; ++_First) { @@ -5532,7 +5487,6 @@ _NODISCARD _CONSTEXPR20 bool _Check_match_counts( return true; } -// FUNCTION TEMPLATE reverse template _CONSTEXPR20 void reverse(const _BidIt _First, const _BidIt _Last) { // reverse elements in [_First, _Last) _Adl_verify_range(_First, _Last); @@ -5579,7 +5533,6 @@ void reverse(_ExPo&&, _BidIt _First, _BidIt _Last) noexcept /* terminates */ { } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE rotate template constexpr pair<_BidIt, _BidIt> _Reverse_until_sentinel_unchecked(_BidIt _First, _BidIt _Sentinel, _BidIt _Last) { // reverse until either _First or _Last hits _Sentinel @@ -5656,7 +5609,6 @@ _FwdIt rotate(_ExPo&&, _FwdIt _First, _FwdIt _Mid, _FwdIt _Last) noexcept /* ter } #endif // _HAS_CXX17 -// FUNCTION TEMPLATE find_if template _NODISCARD _CONSTEXPR20 _InIt find_if(_InIt _First, const _InIt _Last, _Pr _Pred) { // find first satisfying _Pred _Adl_verify_range(_First, _Last); @@ -5771,7 +5723,6 @@ struct _Require_constant; // _Require_constant is a valid template-id iff E i // type #endif // __cpp_lib_concepts -// FUNCTION TEMPLATE lower_bound template _NODISCARD _CONSTEXPR20 _FwdIt lower_bound(_FwdIt _First, const _FwdIt _Last, const _Ty& _Val, _Pr _Pred) { // find first element not before _Val @@ -5800,7 +5751,6 @@ _NODISCARD _CONSTEXPR20 _FwdIt lower_bound(_FwdIt _First, _FwdIt _Last, const _T return _STD lower_bound(_First, _Last, _Val, less<>{}); } -// FUNCTION TEMPLATE _Swap_ranges_unchecked template _CONSTEXPR20 _FwdIt2 _Swap_ranges_unchecked(_FwdIt1 _First1, const _FwdIt1 _Last1, _FwdIt2 _First2) { // swap [_First1, _Last1) with [_First2, ...), no special optimization @@ -5938,7 +5888,6 @@ struct _CXX17_DEPRECATE_ITERATOR_BASE_CLASS iterator { // base type for iterator using reference = _Reference; }; -// FUNCTION TEMPLATE _Float_abs_bits template , int> = 0> _NODISCARD _CONSTEXPR_BIT_CAST auto _Float_abs_bits(const _Ty& _Xx) { using _Traits = _Floating_type_traits<_Ty>; @@ -5947,13 +5896,11 @@ _NODISCARD _CONSTEXPR_BIT_CAST auto _Float_abs_bits(const _Ty& _Xx) { return _Bits & ~_Traits::_Shifted_sign_mask; } -// FUNCTION TEMPLATE _Float_abs template , int> = 0> _NODISCARD _CONSTEXPR_BIT_CAST _Ty _Float_abs(const _Ty _Xx) { // constexpr floating-point abs() return _Bit_cast<_Ty>(_Float_abs_bits(_Xx)); } -// FUNCTION TEMPLATE _Float_copysign template , int> = 0> _NODISCARD _CONSTEXPR_BIT_CAST _Ty _Float_copysign(const _Ty _Magnitude, const _Ty _Sign) { // constexpr copysign() using _Traits = _Floating_type_traits<_Ty>; @@ -5962,14 +5909,12 @@ _NODISCARD _CONSTEXPR_BIT_CAST _Ty _Float_copysign(const _Ty _Magnitude, const _ return _Bit_cast<_Ty>(_Float_abs_bits(_Magnitude) | _Signbit); } -// FUNCTION TEMPLATE _Is_nan template , int> = 0> _NODISCARD _CONSTEXPR_BIT_CAST bool _Is_nan(const _Ty _Xx) { // constexpr isnan() using _Traits = _Floating_type_traits<_Ty>; return _Float_abs_bits(_Xx) > _Traits::_Shifted_exponent_mask; } -// FUNCTION TEMPLATE _Is_signaling_nan // TRANSITION, workaround x86 ABI // On x86 ABI, floating-point by-value arguments and return values are passed in 80-bit x87 registers. // When the value is a 32-bit or 64-bit signaling NaN, the conversion to/from 80-bit raises FE_INVALID @@ -5981,14 +5926,12 @@ _NODISCARD _CONSTEXPR_BIT_CAST bool _Is_signaling_nan(const _Ty& _Xx) { // retur return _Abs_bits > _Traits::_Shifted_exponent_mask && ((_Abs_bits & _Traits::_Special_nan_mantissa_mask) == 0); } -// FUNCTION TEMPLATE _Is_inf template , int> = 0> _NODISCARD _CONSTEXPR_BIT_CAST bool _Is_inf(const _Ty _Xx) { // constexpr isinf() using _Traits = _Floating_type_traits<_Ty>; return _Float_abs_bits(_Xx) == _Traits::_Shifted_exponent_mask; } -// FUNCTION TEMPLATE _Is_finite template , int> = 0> _NODISCARD _CONSTEXPR_BIT_CAST bool _Is_finite(const _Ty _Xx) { // constexpr isfinite() using _Traits = _Floating_type_traits<_Ty>; diff --git a/stl/src/filesystem.cpp b/stl/src/filesystem.cpp index 41b79c69f26..c4b3241c8c9 100644 --- a/stl/src/filesystem.cpp +++ b/stl/src/filesystem.cpp @@ -39,7 +39,6 @@ namespace { #define __vcrt_CreateSymbolicLinkW CreateSymbolicLinkW #endif // _CRT_APP - // FUNCTION / MACRO __vcp_CreateFile #ifdef _CRT_APP HANDLE __stdcall __vcp_CreateFile(const wchar_t* const _File_name, const unsigned long _Desired_access, const unsigned long _Share, SECURITY_ATTRIBUTES* const _Security_attributes, @@ -57,7 +56,6 @@ namespace { #define __vcp_CreateFile CreateFileW #endif // _CRT_APP - // FUNCTION _Translate_CreateFile_last_error [[nodiscard]] __std_win_error __stdcall _Translate_CreateFile_last_error(const HANDLE _Handle) { if (_Handle != INVALID_HANDLE_VALUE) { return __std_win_error::_Success; @@ -66,7 +64,6 @@ namespace { return __std_win_error{GetLastError()}; } - // FUNCTION __vcp_CopyFile [[nodiscard]] __std_fs_copy_file_result __stdcall __vcp_Copyfile( const wchar_t* const _Source, const wchar_t* const _Target, const bool _Fail_if_exists) noexcept { #if defined(_CRT_APP) diff --git a/stl/src/iomanip.cpp b/stl/src/iomanip.cpp index 72769a6f301..29ffd324cc2 100644 --- a/stl/src/iomanip.cpp +++ b/stl/src/iomanip.cpp @@ -5,17 +5,14 @@ #include _STD_BEGIN -// FUNCTION resetiosflags static void __cdecl rsfun(ios_base& iostr, ios_base::fmtflags mask) { // reset specified format flags iostr.setf(ios_base::_Fmtzero, mask); } -// FUNCTION setiosflags static void __cdecl sifun(ios_base& iostr, ios_base::fmtflags mask) { // set specified format flags iostr.setf(ios_base::_Fmtmask, mask); } -// FUNCTION setbase static void __cdecl sbfun(ios_base& iostr, int base) { // set base iostr.setf(base == 8 ? ios_base::oct : base == 10 ? ios_base::dec @@ -24,12 +21,10 @@ static void __cdecl sbfun(ios_base& iostr, int base) { // set base ios_base::basefield); } -// FUNCTION setprecision static void __cdecl spfun(ios_base& iostr, streamsize prec) { // set precision iostr.precision(prec); } -// FUNCTION setw static void __cdecl swfun(ios_base& iostr, streamsize wide) { // set width iostr.width(wide); } diff --git a/stl/src/memory_resource.cpp b/stl/src/memory_resource.cpp index 911ca06a2fd..5ec34f11bd8 100644 --- a/stl/src/memory_resource.cpp +++ b/stl/src/memory_resource.cpp @@ -58,7 +58,6 @@ namespace pmr { return _Unaligned_new_delete_resource(); } - // FUNCTION null_memory_resource extern "C" _NODISCARD _CRT_SATELLITE_1 memory_resource* __cdecl null_memory_resource() noexcept { class _Null_resource final : public _Identity_equal_resource { virtual void* do_allocate(size_t, size_t) override { // Sorry, OOM! From 204321c7652160318bb103f3fefa7cdcd4c7d3c5 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 22 Jul 2021 10:57:25 +0100 Subject: [PATCH 03/29] Remove PARALLEL FUNCTION --- stl/inc/algorithm | 1 - stl/inc/execution | 35 ----------------------------------- 2 files changed, 36 deletions(-) diff --git a/stl/inc/algorithm b/stl/inc/algorithm index 24ef5210490..f6d8b4d534b 100644 --- a/stl/inc/algorithm +++ b/stl/inc/algorithm @@ -383,7 +383,6 @@ 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 diff --git a/stl/inc/execution b/stl/inc/execution index fe7faf9ad1a..b8a5157a593 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -1060,7 +1060,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; @@ -1142,7 +1141,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 @@ -1157,7 +1155,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 @@ -1172,7 +1169,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 @@ -1243,7 +1239,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 @@ -1292,7 +1287,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>>; @@ -1370,7 +1364,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 @@ -1384,7 +1377,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 @@ -1399,7 +1391,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) { @@ -1599,7 +1590,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 */ { @@ -1622,7 +1612,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; @@ -1695,7 +1684,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>; @@ -1771,7 +1759,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>> @@ -1968,7 +1955,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>; @@ -2083,7 +2069,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; @@ -2203,7 +2188,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; @@ -2301,7 +2285,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>; @@ -2458,7 +2441,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 */ { @@ -2471,7 +2453,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 */ { @@ -2485,7 +2466,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 @@ -2632,7 +2612,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; @@ -2772,7 +2751,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; @@ -3035,7 +3013,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; @@ -3111,7 +3088,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; @@ -3264,7 +3240,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>; @@ -3338,7 +3313,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 @@ -3586,7 +3560,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; @@ -3931,7 +3904,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( @@ -4021,7 +3993,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 @@ -4126,7 +4097,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>; @@ -4325,7 +4295,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 @@ -4472,7 +4441,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) { @@ -4660,7 +4628,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) { @@ -4806,7 +4773,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) { @@ -5003,7 +4969,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>; From 40f553efa9ab9035b287ca645840a49e928c100d Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 22 Jul 2021 10:58:31 +0100 Subject: [PATCH 04/29] Remove ENUM --- stl/inc/chrono | 1 - stl/inc/cstddef | 1 - stl/inc/execution | 1 - stl/inc/experimental/filesystem | 4 ---- stl/inc/filesystem | 4 ---- stl/inc/future | 3 --- stl/inc/limits | 2 -- stl/inc/system_error | 1 - stl/inc/xatomic.h | 2 -- stl/inc/xcharconv.h | 1 - stl/inc/xerrc.h | 1 - stl/inc/xlocale | 1 - stl/inc/xutility | 7 +++---- 13 files changed, 3 insertions(+), 26 deletions(-) diff --git a/stl/inc/chrono b/stl/inc/chrono index b869fb08efa..0722f48b10b 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -2297,7 +2297,6 @@ namespace chrono { // [time.zone.timezone] - // ENUM CLASS choose enum class choose { earliest, latest }; class time_zone { 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/execution b/stl/inc/execution index b8a5157a593..5c594ee5186 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -157,7 +157,6 @@ protected: _THROW(_Parallelism_resources_exhausted{}); } -// ENUM CLASS _Cancellation_status enum class _Cancellation_status : bool { _Running, _Canceled }; // STRUCT _Cancellation_token diff --git a/stl/inc/experimental/filesystem b/stl/inc/experimental/filesystem index b5e0ea46fe4..a0a27ce7f22 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 diff --git a/stl/inc/filesystem b/stl/inc/filesystem index 522e7c26f51..b688713ca82 100644 --- a/stl/inc/filesystem +++ b/stl/inc/filesystem @@ -1868,7 +1868,6 @@ namespace filesystem { _THROW(filesystem_error(_Op, _Path1, _Path2, _Error)); } - // ENUM CLASS file_type enum class file_type { none, not_found, @@ -1888,7 +1887,6 @@ namespace filesystem { junction // implementation-defined value indicating an NT junction }; - // ENUM CLASS perms enum class perms { none = 0, @@ -1920,7 +1918,6 @@ namespace filesystem { _BITMASK_OPS(perms) - // ENUM CLASS copy_options enum class copy_options { none = static_cast(__std_fs_copy_options::_None), @@ -2526,7 +2523,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) diff --git a/stl/inc/future b/stl/inc/future index 98f8ce77bff..9d95e54fe8d 100644 --- a/stl/inc/future +++ b/stl/inc/future @@ -61,7 +61,6 @@ _NODISCARD _Unique_ptr_alloc<_Alloc> _Make_unique_alloc(_Alloc& _Al, _Args&&... // 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, @@ -69,7 +68,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 @@ -77,7 +75,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, diff --git a/stl/inc/limits b/stl/inc/limits index 2b0a7caf089..db6cec1a0cb 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, diff --git a/stl/inc/system_error b/stl/inc/system_error index ab4683ad750..3d165a911da 100644 --- a/stl/inc/system_error +++ b/stl/inc/system_error @@ -30,7 +30,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// ENUM CLASS io_errc enum class io_errc { // error codes for ios_base::failure stream = 1 }; diff --git a/stl/inc/xatomic.h b/stl/inc/xatomic.h index 7377cd0f4da..d0472d7ed4b 100644 --- a/stl/inc/xatomic.h +++ b/stl/inc/xatomic.h @@ -53,7 +53,6 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN #if _HAS_CXX20 -// ENUM CLASS memory_order enum class memory_order : int { relaxed, consume, @@ -77,7 +76,6 @@ inline constexpr memory_order memory_order_release = memory_order::release; inline constexpr memory_order memory_order_acq_rel = memory_order::acq_rel; inline constexpr memory_order memory_order_seq_cst = memory_order::seq_cst; #else // _HAS_CXX20 -// ENUM memory_order enum memory_order { memory_order_relaxed, memory_order_consume, diff --git a/stl/inc/xcharconv.h b/stl/inc/xcharconv.h index fff630353ae..2c39532fb70 100644 --- a/stl/inc/xcharconv.h +++ b/stl/inc/xcharconv.h @@ -25,7 +25,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// ENUM CLASS chars_format enum class chars_format { scientific = 0b001, fixed = 0b010, diff --git a/stl/inc/xerrc.h b/stl/inc/xerrc.h index c1aa1a18368..8a7e7aae66e 100644 --- a/stl/inc/xerrc.h +++ b/stl/inc/xerrc.h @@ -17,7 +17,6 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN -// ENUM CLASS errc enum class errc { // names for generic error codes address_family_not_supported = 102, // EAFNOSUPPORT address_in_use = 100, // EADDRINUSE diff --git a/stl/inc/xlocale b/stl/inc/xlocale index b94091c2601..fc804460cfc 100644 --- a/stl/inc/xlocale +++ b/stl/inc/xlocale @@ -830,7 +830,6 @@ _NODISCARD int _Codecvt_do_length( return static_cast((_STD min) (_First1 - _Old_first1, ptrdiff_t{INT_MAX})); } -// ENUM _Codecvt_mode enum _Codecvt_mode { _Consume_header = 4, _Generate_header = 2 }; template <> diff --git a/stl/inc/xutility b/stl/inc/xutility index b9a6c8bd95c..e1bbdbb8284 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -3114,7 +3114,7 @@ namespace ranges { inline constexpr _Prev_fn prev{_Not_quite_object::_Construct_tag{}}; - template _Se> + template _Se> _NODISCARD constexpr _It _Find_last_iterator( const _It& _First, const _Se& _Last, const iter_difference_t<_It> _Count) { // Find the iterator in [_First, _Last) (of length _Count) which equals _Last @@ -3379,8 +3379,7 @@ namespace ranges { } }; - // ENUM CLASS ranges::subrange_kind - enum class subrange_kind : bool { unsized, sized }; + enum class subrange_kind : bool { unsized, sized }; // clang-format on } // namespace ranges @@ -4857,7 +4856,7 @@ _NODISCARD bool equal(_ExPo&& _Exec, const _FwdIt1 _First1, const _FwdIt1 _Last1 #ifdef __cpp_lib_concepts namespace ranges { - template + template _NODISCARD constexpr iterator_t<_Rng> _Rewrap_iterator(_Rng&& _Range, _It&& _Val) { _STL_INTERNAL_STATIC_ASSERT(is_same_v, _Unwrapped_t>>); From 686bd67fc94db03597a91e443536e8e7fb052083 Mon Sep 17 00:00:00 2001 From: Daniel Marshall Date: Thu, 22 Jul 2021 11:07:13 +0100 Subject: [PATCH 05/29] Remove STRUCT --- stl/inc/algorithm | 7 -- stl/inc/atomic | 11 --- stl/inc/bitset | 1 - stl/inc/chrono | 29 +++----- stl/inc/compare | 1 - stl/inc/complex | 1 - stl/inc/concepts | 1 - stl/inc/coroutine | 6 -- stl/inc/execution | 14 ---- stl/inc/experimental/coroutine | 5 -- stl/inc/experimental/filesystem | 2 - stl/inc/experimental/resumable | 2 - stl/inc/filesystem | 2 - stl/inc/functional | 50 ------------- stl/inc/future | 3 - stl/inc/iomanip | 6 -- stl/inc/limits | 3 - stl/inc/list | 2 - stl/inc/memory | 5 -- stl/inc/new | 1 - stl/inc/optional | 2 - stl/inc/random | 2 - stl/inc/ratio | 12 ---- stl/inc/regex | 3 - stl/inc/span | 6 -- stl/inc/system_error | 3 - stl/inc/thread | 1 - stl/inc/tuple | 11 --- stl/inc/type_traits | 120 -------------------------------- stl/inc/typeindex | 1 - stl/inc/utility | 3 - stl/inc/variant | 3 - stl/inc/vector | 2 - stl/inc/xcall_once.h | 1 - stl/inc/xcharconv.h | 1 - stl/inc/xhash | 1 - stl/inc/xiosbase | 2 - stl/inc/xlocale | 2 - stl/inc/xlocmes | 1 - stl/inc/xlocmon | 1 - stl/inc/xlocnum | 1 - stl/inc/xloctime | 1 - stl/inc/xmemory | 29 +------- stl/inc/xnode_handle.h | 1 - stl/inc/xstddef | 20 ------ stl/inc/xstring | 14 ---- stl/inc/xtr1common | 12 ---- stl/inc/xtree | 1 - stl/inc/xutility | 34 --------- 49 files changed, 10 insertions(+), 433 deletions(-) diff --git a/stl/inc/algorithm b/stl/inc/algorithm index f6d8b4d534b..4f159f086bc 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; @@ -4848,7 +4842,6 @@ void random_shuffle(_RanIt _First, _RanIt _Last, _RngFn&& _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; diff --git a/stl/inc/atomic b/stl/inc/atomic index 5b343dcdf53..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{}; @@ -317,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 @@ -339,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; @@ -370,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 @@ -1318,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 @@ -1652,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 @@ -1786,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 @@ -1982,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>; @@ -2085,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&>; @@ -2146,7 +2137,6 @@ struct _Atomic_pointer<_Ty&> : _Atomic_storage<_Ty&> { }; -// STRUCT TEMPLATE atomic #define ATOMIC_VAR_INIT(_Value) \ { _Value } @@ -2833,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 05e1fa62cd8..da4601cd4da 100644 --- a/stl/inc/bitset +++ b/stl/inc/bitset @@ -554,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/chrono b/stl/inc/chrono index 0722f48b10b..14c15f34812 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -49,15 +49,13 @@ _STL_DISABLE_CLANG_WARNINGS _STD_BEGIN namespace chrono { - // STRUCT TEMPLATE treat_as_floating_point - template + 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 + template struct duration_values { // gets arithmetic properties of a type _NODISCARD static constexpr _Rep zero() noexcept { // get zero value @@ -277,11 +275,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 @@ -2239,8 +2235,7 @@ namespace chrono { // [time.zone.info] - // STRUCT sys_info - struct sys_info { + struct sys_info { sys_seconds begin; sys_seconds end; seconds offset; @@ -2248,8 +2243,7 @@ namespace chrono { string abbrev; }; - // STRUCT local_info - struct local_info { + struct local_info { static constexpr int unique = 0; static constexpr int nonexistent = 1; static constexpr int ambiguous = 2; @@ -2607,8 +2601,7 @@ namespace chrono { return _Result == _Vec.end() ? nullptr : &*_Result; } - // STRUCT tzdb - struct tzdb { + struct tzdb { string version; vector zones; vector links; @@ -2916,12 +2909,10 @@ namespace chrono { // [time.zone.zonedtraits] - // STRUCT TEMPLATE zoned_traits - template + template struct zoned_traits {}; - // STRUCT zoned_traits - template <> + template <> struct zoned_traits { _NODISCARD static const time_zone* default_zone() { return _CHRONO get_tzdb().locate_zone("UTC"); @@ -3116,8 +3107,7 @@ namespace chrono { using utc_time = time_point; using utc_seconds = utc_time; - // STRUCT leap_second_info - struct leap_second_info { + struct leap_second_info { bool is_leap_second; seconds elapsed; }; @@ -3386,8 +3376,7 @@ namespace chrono { #if _HAS_CXX20 // [time.clock.conv] - // STRUCT TEMPLATE clock_time_conversion - template + template struct clock_time_conversion {}; // [time.clock.cast.id] diff --git a/stl/inc/compare b/stl/inc/compare index 72e7a511690..8e57b431b37 100644 --- a/stl/inc/compare +++ b/stl/inc/compare @@ -333,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 5c74b2a36b6..04b9d94910c 100644 --- a/stl/inc/complex +++ b/stl/inc/complex @@ -914,7 +914,6 @@ public: } }; -// STRUCT TEMPLATE _Complex_value template struct _Complex_value { enum { _Re = 0, _Im = 1 }; 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 0534b6de883..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; @@ -243,7 +239,6 @@ _NODISCARD inline noop_coroutine_handle noop_coroutine() noexcept { return noop_coroutine_handle{}; } -// STRUCT suspend_never struct suspend_never { _NODISCARD constexpr bool await_ready() const noexcept { return true; @@ -253,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/execution b/stl/inc/execution index 5c594ee5186..80fdcd8c967 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 @@ -159,7 +158,6 @@ protected: enum class _Cancellation_status : bool { _Running, _Canceled }; -// STRUCT _Cancellation_token struct _Cancellation_token { atomic<_Cancellation_status> _Is_canceled_impl{_Cancellation_status::_Running}; @@ -261,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); @@ -362,7 +359,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; @@ -385,7 +381,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; @@ -412,7 +407,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 @@ -447,7 +441,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 @@ -667,7 +660,6 @@ private: }; #pragma warning(pop) -// STRUCT TEMPLATE _Work_stealing_membership enum class _Steal_result { _Success, _Abort, _Done }; template @@ -725,7 +717,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; @@ -769,7 +760,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()] @@ -781,7 +771,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; @@ -831,14 +820,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; @@ -959,7 +946,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; 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/filesystem b/stl/inc/experimental/filesystem index a0a27ce7f22..42ce5a9e5ff 100644 --- a/stl/inc/experimental/filesystem +++ b/stl/inc/experimental/filesystem @@ -155,7 +155,6 @@ private: perms _Myperms; }; -// STRUCT space_info struct space_info { // space information for a file uintmax_t capacity; uintmax_t free; @@ -192,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 diff --git a/stl/inc/experimental/resumable b/stl/inc/experimental/resumable index c9fcdc6018d..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; diff --git a/stl/inc/filesystem b/stl/inc/filesystem index b688713ca82..a6281229aca 100644 --- a/stl/inc/filesystem +++ b/stl/inc/filesystem @@ -2096,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; @@ -2631,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); diff --git a/stl/inc/functional b/stl/inc/functional index 2f13245e146..807df992d00 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -29,16 +29,12 @@ _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 template struct divides { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -50,7 +46,6 @@ struct divides { } }; -// STRUCT TEMPLATE modulus template struct modulus { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -62,7 +57,6 @@ struct modulus { } }; -// STRUCT TEMPLATE negate template struct negate { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _ARGUMENT_TYPE_NAME; @@ -73,25 +67,18 @@ 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 -// STRUCT TEMPLATE logical_and template struct logical_and { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -103,7 +90,6 @@ struct logical_and { } }; -// STRUCT TEMPLATE logical_or template struct logical_or { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -115,7 +101,6 @@ struct logical_or { } }; -// STRUCT TEMPLATE logical_not template struct logical_not { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _ARGUMENT_TYPE_NAME; @@ -126,7 +111,6 @@ struct logical_not { } }; -// STRUCT TEMPLATE bit_and template struct bit_and { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -138,7 +122,6 @@ struct bit_and { } }; -// STRUCT TEMPLATE bit_or template struct bit_or { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -150,7 +133,6 @@ struct bit_or { } }; -// STRUCT TEMPLATE bit_xor template struct bit_xor { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _FIRST_ARGUMENT_TYPE_NAME; @@ -162,7 +144,6 @@ struct bit_xor { } }; -// STRUCT TEMPLATE bit_not template struct bit_not { _CXX17_DEPRECATE_ADAPTOR_TYPEDEFS typedef _Ty _ARGUMENT_TYPE_NAME; @@ -173,16 +154,12 @@ struct bit_not { } }; -// STRUCT TEMPLATE SPECIALIZATION plus // defined in -// STRUCT TEMPLATE SPECIALIZATION minus // defined in -// STRUCT TEMPLATE SPECIALIZATION multiplies // defined in -// STRUCT TEMPLATE SPECIALIZATION divides template <> struct divides { template @@ -194,7 +171,6 @@ struct divides { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION modulus template <> struct modulus { template @@ -206,7 +182,6 @@ struct modulus { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION negate template <> struct negate { template @@ -217,25 +192,18 @@ 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 -// STRUCT TEMPLATE SPECIALIZATION logical_and template <> struct logical_and { template @@ -247,7 +215,6 @@ struct logical_and { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION logical_or template <> struct logical_or { template @@ -259,7 +226,6 @@ struct logical_or { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION logical_not template <> struct logical_not { template @@ -270,7 +236,6 @@ struct logical_not { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION bit_and template <> struct bit_and { template @@ -282,7 +247,6 @@ struct bit_and { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION bit_or template <> struct bit_or { template @@ -294,7 +258,6 @@ struct bit_or { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION bit_xor template <> struct bit_xor { template @@ -306,7 +269,6 @@ struct bit_xor { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION bit_not template <> struct bit_not { template @@ -710,7 +672,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 @@ -1064,7 +1025,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."); @@ -1229,7 +1189,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 @@ -1295,7 +1254,6 @@ _INLINE_VAR constexpr int is_placeholder_v = is_placeholder<_Ty>::value; template class _Binder; -// STRUCT TEMPLATE is_bind_expression template struct is_bind_expression : false_type {}; // _Tx is not a bind expression @@ -1539,7 +1497,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 @@ -1587,7 +1544,6 @@ _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); @@ -1669,7 +1625,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>; @@ -1706,7 +1661,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>; @@ -1883,7 +1837,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>; @@ -2170,7 +2123,6 @@ private: #ifdef __cpp_lib_concepts namespace ranges { - // STRUCT ranges::not_equal_to struct not_equal_to { // clang-format off template @@ -2184,7 +2136,6 @@ namespace ranges { using is_transparent = int; }; - // STRUCT ranges::greater_equal struct greater_equal { // clang-format off template @@ -2198,7 +2149,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 9d95e54fe8d..81098872fe5 100644 --- a/stl/inc/future +++ b/stl/inc/future @@ -58,7 +58,6 @@ _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 class future_errc { // names for futures errors @@ -85,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 {}; @@ -166,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; diff --git a/stl/inc/iomanip b/stl/inc/iomanip index 5833443c1b9..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) {} @@ -52,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) {} @@ -117,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) { @@ -188,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>; @@ -203,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) @@ -394,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/limits b/stl/inc/limits index db6cec1a0cb..8e2681fdaab 100644 --- a/stl/inc/limits +++ b/stl/inc/limits @@ -37,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; @@ -113,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; @@ -122,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; diff --git a/stl/inc/list b/stl/inc/list index beb9b1368f5..ddf863fa9b4 100644 --- a/stl/inc/list +++ b/stl/inc/list @@ -574,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>; @@ -607,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 diff --git a/stl/inc/memory b/stl/inc/memory index 3f101a2f3ba..82032bc8b00 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -3098,8 +3098,6 @@ private: }; - -// STRUCT TEMPLATE default_delete template struct default_delete { // default deleter for unique_ptr constexpr default_delete() noexcept = default; @@ -3127,7 +3125,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*; @@ -3593,7 +3590,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 @@ -3660,7 +3656,6 @@ struct owner_less { using is_transparent = int; }; -// STRUCT TEMPLATE SPECIALIZATION hash template struct hash> : _Conditionally_enabled_hash, is_default_constructible_v::pointer>>> { diff --git a/stl/inc/new b/stl/inc/new index 4ba05d77541..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; }; diff --git a/stl/inc/optional b/stl/inc/optional index 98b60b77a82..4da38c0e43d 100644 --- a/stl/inc/optional +++ b/stl/inc/optional @@ -30,7 +30,6 @@ _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) {} @@ -673,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/random b/stl/inc/random index ca71aef2037..344fc32fde3 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -755,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; @@ -917,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; diff --git a/stl/inc/ratio b/stl/inc/ratio index f8562fb72c7..17823ad9967 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"); @@ -174,7 +168,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 +176,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 +184,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 +240,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 +249,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 +257,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 a62a64e517b..c4df7af6ed2 100644 --- a/stl/inc/regex +++ b/stl/inc/regex @@ -1227,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) {} @@ -1287,7 +1286,6 @@ private: _Elem* _Chrs; }; -// STRUCT _Bitmap struct _Bitmap { // accelerator table for small character values _Bitmap() { _CSTD memset(_Chrs, '\0', _Bmp_size); @@ -1311,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) {} diff --git a/stl/inc/span b/stl/inc/span index b1d174b8cd2..4de9785c345 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*; @@ -276,26 +274,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 {}; diff --git a/stl/inc/system_error b/stl/inc/system_error index 3d165a911da..c62d0f3cbba 100644 --- a/stl/inc/system_error +++ b/stl/inc/system_error @@ -34,7 +34,6 @@ 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 {}; @@ -44,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 {}; @@ -409,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; 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 a3757978c2e..d2061f89dc3 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -35,7 +35,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 +47,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; @@ -116,7 +114,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 +123,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 +132,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 +140,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 +155,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() {} @@ -896,7 +889,6 @@ _NODISCARD constexpr tuple<_Types&&...> forward_as_tuple(_Types&&... _Args) noex return tuple<_Types&&...>(_STD forward<_Types>(_Args)...); } -// STRUCT TEMPLATE _Cat_sequences template struct _Cat_sequences; @@ -922,7 +914,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."); @@ -948,7 +939,6 @@ 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 @@ -1011,7 +1001,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 cb1eb0422e1..8d63f301a72 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; @@ -146,7 +136,6 @@ using add_rvalue_reference_t = typename _Add_reference<_Ty>::_Rvalue; template add_rvalue_reference_t<_Ty> declval() noexcept; -// STRUCT TEMPLATE remove_extent template struct remove_extent { // remove array extent using type = _Ty; @@ -165,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; @@ -184,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; @@ -213,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; @@ -233,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 @@ -247,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; @@ -257,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; @@ -268,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 @@ -278,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 @@ -288,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 @@ -301,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 @@ -320,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 @@ -328,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 @@ -358,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 @@ -366,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>>; @@ -374,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 @@ -396,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 @@ -439,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 @@ -449,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 @@ -459,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>; @@ -467,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>; @@ -475,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; @@ -498,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); @@ -510,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>; @@ -518,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 @@ -561,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 @@ -571,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)> { @@ -588,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 @@ -597,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 @@ -607,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 @@ -616,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 @@ -624,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... @@ -634,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 @@ -643,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 @@ -652,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 {} @@ -665,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 @@ -674,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)> { @@ -709,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 @@ -734,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 @@ -744,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 @@ -753,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)> { @@ -764,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 @@ -773,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 @@ -782,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 @@ -791,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)> { @@ -802,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 @@ -811,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 @@ -821,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 @@ -830,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)> { @@ -842,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 @@ -851,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 @@ -860,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 @@ -869,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)> { @@ -880,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 @@ -889,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 @@ -899,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>; @@ -921,7 +844,6 @@ 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 @@ -932,7 +854,6 @@ _INLINE_VAR constexpr bool is_unsigned_v = _Sign_base<_Ty>::_Unsigned; 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 @@ -989,7 +910,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 @@ -1040,14 +960,12 @@ constexpr make_unsigned_t<_Rep> _Unsigned_value(_Rep _Val) { // makes _Val unsig 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; @@ -1117,7 +1035,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; @@ -1143,7 +1060,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); @@ -1158,7 +1074,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 @@ -1171,7 +1086,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 @@ -1187,7 +1101,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 @@ -1196,7 +1109,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>; @@ -1211,7 +1123,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 {}; @@ -1267,7 +1178,6 @@ 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 {}; @@ -1304,7 +1214,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 @@ -1321,7 +1230,6 @@ struct _Add_qualifiers<_Ty1&&> { using _Apply = add_rvalue_reference_t<_Copy_cv<_Ty1, _Ty2>>; }; -// STRUCT TEMPLATE common_reference template struct common_reference; @@ -1412,7 +1320,6 @@ template struct common_reference<_Ty1, _Ty2, _Ty3, _Rest...> : _Fold_common_reference {}; #endif // _HAS_CXX20 -// STRUCT TEMPLATE _Identity template struct _Identity { using type = _Ty; @@ -1421,7 +1328,6 @@ template using _Identity_t = typename _Identity<_Ty>::type; #if _HAS_CXX20 -// STRUCT TEMPLATE type_identity template struct type_identity { using type = _Ty; @@ -1430,7 +1336,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