diff --git a/stl/inc/__msvc_format_ucd_tables.hpp b/stl/inc/__msvc_format_ucd_tables.hpp index 14ac2ebcb23..577627ed039 100644 --- a/stl/inc/__msvc_format_ucd_tables.hpp +++ b/stl/inc/__msvc_format_ucd_tables.hpp @@ -124,7 +124,6 @@ struct _Unicode_property_data { // Codepoint ranges may not overlap, and, within one property, a codepoint may only appear once. Furthermore the // codepoint lower bounds appear in sorted (ascending) order. - enum class _Grapheme_Break_property_values : uint8_t { _CR_value, _Control_value, @@ -339,7 +338,6 @@ inline constexpr _Unicode_property_data<_Grapheme_Break_property_values, 1355> _ 0x2004, 0x2003, 0x2037, 0x2032, 0x2001, 0x2001, 0x2005, 0x200f, 0x2007, 0x2011, 0x2007, 0x2002, 0x2005, 0x2007, 0x2001, 0x2004, 0x2007, 0x2007, 0x801a, 0x2005, 0x1020, 0x2060, 0x1080, 0x20f0, 0x1e10}}; - enum class _Extended_Pictographic_property_values : uint8_t { _Extended_Pictographic_value, _No_value = 255 }; inline constexpr _Unicode_property_data<_Extended_Pictographic_property_values, 78> diff --git a/stl/inc/atomic b/stl/inc/atomic index 6848b13c053..6d25543e92f 100644 --- a/stl/inc/atomic +++ b/stl/inc/atomic @@ -2088,7 +2088,6 @@ struct _Atomic_pointer : _Atomic_storage<_Ty> { } }; - template struct _Atomic_pointer<_Ty&> : _Atomic_storage<_Ty&> { using _Base = _Atomic_storage<_Ty&>; @@ -2143,7 +2142,6 @@ struct _Atomic_pointer<_Ty&> : _Atomic_storage<_Ty&> { } }; - #define ATOMIC_VAR_INIT(_Value) \ { _Value } @@ -2885,7 +2883,6 @@ _EXPORT_STD struct atomic_flag { // flag with test-and-set semantics #endif // TRANSITION, ABI }; - #if _HAS_CXX20 _EXPORT_STD _NODISCARD inline bool atomic_flag_test(const volatile atomic_flag* const _Flag) noexcept { return _Flag->test(); diff --git a/stl/inc/charconv b/stl/inc/charconv index c26313fb9b3..30af3dae36e 100644 --- a/stl/inc/charconv +++ b/stl/inc/charconv @@ -204,7 +204,6 @@ _EXPORT_STD _CONSTEXPR23 to_chars_result to_chars(char* const _First, char* cons _EXPORT_STD to_chars_result to_chars(char* _First, char* _Last, bool _Value, int _Base = 10) = delete; - _EXPORT_STD struct from_chars_result { const char* ptr; errc ec; @@ -933,7 +932,6 @@ _NODISCARD inline uint64_t _Divide(_Big_integer_flt& _Numerator, const _Big_inte // ^^^^^^^^^^ DERIVED FROM corecrt_internal_big_integer.h ^^^^^^^^^^ - // vvvvvvvvvv DERIVED FROM corecrt_internal_strtox.h vvvvvvvvvv // This type is used to hold a partially-parsed string representation of a floating-point number. @@ -2275,7 +2273,6 @@ _NODISCARD to_chars_result _Floating_to_chars_hex_shortest( return _STD to_chars(_First, _Last, static_cast(_Unbiased_exponent)); } - template _NODISCARD inline to_chars_result _Floating_to_chars_general_precision( char* _First, char* const _Last, const _Floating _Value, int _Precision) noexcept { diff --git a/stl/inc/chrono b/stl/inc/chrono index 6d967cf5d02..e6bfa99bb77 100644 --- a/stl/inc/chrono +++ b/stl/inc/chrono @@ -3131,7 +3131,6 @@ namespace chrono { return (_Bits & ~_Optional) == _Must_set; } - template static constexpr _Ty _Invalid_time_field{numeric_limits<_Ty>::lowest()}; @@ -4693,7 +4692,6 @@ _NODISCARD constexpr const _CharT* _Choose_literal(const char* const _Str, const #define _STATICALLY_WIDEN(_CharT, _Literal) (_Choose_literal<_CharT>(_Literal, L##_Literal)) - // clang-format off template concept _Chrono_parse_spec_callbacks = _Parse_align_callbacks<_Ty, _CharT> diff --git a/stl/inc/cmath b/stl/inc/cmath index 26a3919db7b..f0c954e638c 100644 --- a/stl/inc/cmath +++ b/stl/inc/cmath @@ -554,7 +554,6 @@ _NODISCARD _Check_return_ inline long double trunc(_In_ long double _Xx) noexcep #endif // ^^^ intrinsics unavailable ^^^ } - _STD_BEGIN template using _Common_float_type_t = conditional_t || is_same_v<_Ty2, long double>, long double, @@ -712,7 +711,6 @@ _GENERIC_MATH2(fmin) #undef _GENERIC_MATH2I #undef _HAS_CMATH_INTRINSICS - _STD_BEGIN _EXPORT_STD using _CSTD abs; _EXPORT_STD using _CSTD acos; diff --git a/stl/inc/execution b/stl/inc/execution index 06461dc72dd..87423960973 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -5098,7 +5098,7 @@ void uninitialized_default_construct(_ExPo&& _Exec, const _NoThrowFwdIt _First, _EXPORT_STD template /* = 0 */> _NoThrowFwdIt uninitialized_default_construct_n(_ExPo&& _Exec, _NoThrowFwdIt _First, const _Diff _Count_raw) noexcept /* terminates */ { - // default-initialize all elements in [_First, _First + _Count_raw) + // default-initialize all elements in [_First, _First + _Count) _REQUIRE_PARALLEL_LVALUE_ITERATOR(_NoThrowFwdIt); _Algorithm_int_t<_Diff> _Count = _Count_raw; if (_Count <= 0) { @@ -5163,7 +5163,7 @@ void uninitialized_value_construct(_ExPo&&, _NoThrowFwdIt _First, _NoThrowFwdIt _EXPORT_STD template /* = 0 */> _NoThrowFwdIt uninitialized_value_construct_n(_ExPo&&, _NoThrowFwdIt _First, const _Diff _Count_raw) noexcept /* terminates */ { - // value-initialize all elements in [_First, _First + _Count_raw) + // value-initialize all elements in [_First, _First + _Count) _REQUIRE_PARALLEL_LVALUE_ITERATOR(_NoThrowFwdIt); _Algorithm_int_t<_Diff> _Count = _Count_raw; diff --git a/stl/inc/expected b/stl/inc/expected index 573d1e7d69b..a0f05bd8eea 100644 --- a/stl/inc/expected +++ b/stl/inc/expected @@ -358,8 +358,7 @@ public: template static constexpr void _Reinit_expected(_First& _New_val, _Second& _Old_val, _Args&&... _Vals) noexcept( - is_nothrow_constructible_v<_First, _Args...>) // strengthened - { + is_nothrow_constructible_v<_First, _Args...>) /* strengthened */ { if constexpr (is_nothrow_constructible_v<_First, _Args...>) { if constexpr (!is_trivially_destructible_v<_Second>) { _Old_val.~_Second(); diff --git a/stl/inc/experimental/coroutine b/stl/inc/experimental/coroutine index 954ff41208c..8b5549681c2 100644 --- a/stl/inc/experimental/coroutine +++ b/stl/inc/experimental/coroutine @@ -190,7 +190,6 @@ namespace experimental { return !(_Left < _Right); } - struct suspend_if { bool _Ready; diff --git a/stl/inc/filesystem b/stl/inc/filesystem index ffa373bac8c..7b624a88cb6 100644 --- a/stl/inc/filesystem +++ b/stl/inc/filesystem @@ -1665,7 +1665,6 @@ namespace filesystem { return _Result; } - const iterator _This_end = _This.end(); const iterator _Base_begin = _Base.begin(); const iterator _Base_end = _Base.end(); diff --git a/stl/inc/format b/stl/inc/format index aa4066bc5e0..8c5eec979cb 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -358,7 +358,6 @@ public: } }; - // Implements a DFA matching the regex on the left side of rule GB11. The DFA is: // // +---+ ExtPic +---+ ZWJ +---+ @@ -2549,7 +2548,6 @@ template _NODISCARD _OutputIt _Fmt_write( _OutputIt _Out, _CharT _Value, _Basic_format_specs<_CharT> _Specs, _Lazy_locale _Locale); - template _NODISCARD _OutputIt _Fmt_write( _OutputIt _Out, _Float _Value, const _Basic_format_specs<_CharT>& _Specs, _Lazy_locale _Locale); @@ -3017,7 +3015,6 @@ public: } }; - class _Measure_string_prefix_iterator_legacy { private: _Fmt_codec _Codec = _Get_fmt_codec(); diff --git a/stl/inc/functional b/stl/inc/functional index 23735d35055..69954d4f9c6 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -2314,7 +2314,6 @@ private: _Compressed_pair<_Pred_eq, pair<_FwdItPat, _FwdItPat>> _Data; }; - 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>; @@ -2350,7 +2349,6 @@ private: unordered_map<_Value_t, _Diff, _Hash_ty, _Pred_eq> _Map; }; - 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>; @@ -2482,7 +2480,6 @@ void _Build_boyer_moore_delta_2_table(_Iter_diff_t<_RanItPat>* const _Shifts, co } } - template pair<_RanItHaystack, _RanItHaystack> _Boyer_moore_search( const _Delta1_t& _Delta1, typename _Delta1_t::_Diff* _Delta2, _RanItHaystack _First, _RanItHaystack _Last) { @@ -2524,7 +2521,6 @@ pair<_RanItHaystack, _RanItHaystack> _Boyer_moore_search( return {_First, _Last}; } - template pair<_RanItHaystack, _RanItHaystack> _Boyer_moore_horspool_search( const _Delta1_t& _Delta1, _RanItHaystack _First, _RanItHaystack _Last) { @@ -2562,7 +2558,6 @@ pair<_RanItHaystack, _RanItHaystack> _Boyer_moore_horspool_search( return {_First, _Last}; } - template struct _Single_delta1_type_boyer_moore_traits { using _Diff = _Iter_diff_t<_RanItPat>; @@ -2768,7 +2763,6 @@ using _Boyer_moore_traits = _Boyer_moore_traits_wchar_t_mode<_RanItPat>>, _Boyer_moore_traits_general_mode<_RanItPat, _Hash_ty, _Pred_eq>>; - _EXPORT_STD template >, class _Pred_eq = equal_to<>> class boyer_moore_searcher { public: @@ -2807,7 +2801,6 @@ private: void* _Data; }; - _EXPORT_STD 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/iterator b/stl/inc/iterator index 5eeb541f246..35c85717aad 100644 --- a/stl/inc/iterator +++ b/stl/inc/iterator @@ -252,8 +252,8 @@ public: constexpr istream_iterator() noexcept(is_nothrow_default_constructible_v<_Ty>) /* strengthened */ {} #ifdef __cpp_lib_concepts - constexpr istream_iterator(default_sentinel_t) noexcept(is_nothrow_default_constructible_v<_Ty>) // strengthened - {} + constexpr istream_iterator(default_sentinel_t) noexcept( + is_nothrow_default_constructible_v<_Ty>) /* strengthened */ {} #endif // __cpp_lib_concepts istream_iterator(istream_type& _Istr) : _Myistr(_STD addressof(_Istr)) { diff --git a/stl/inc/memory b/stl/inc/memory index e7ca9c2cfc2..348ae243a52 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -752,7 +752,7 @@ namespace ranges { _EXPORT_STD template _NoThrowFwdIt uninitialized_default_construct_n(_NoThrowFwdIt _First, const _Diff _Count_raw) { - // default-initialize all elements in [_First, _First + _Count_raw) + // default-initialize all elements in [_First, _First + _Count) using _Ty = _Iter_value_t<_NoThrowFwdIt>; _Algorithm_int_t<_Diff> _Count = _Count_raw; if (_Count <= 0) { @@ -886,7 +886,7 @@ namespace ranges { _EXPORT_STD template _NoThrowFwdIt uninitialized_value_construct_n(_NoThrowFwdIt _First, const _Diff _Count_raw) { - // value-initialize all elements in [_First, _First + _Count_raw) + // value-initialize all elements in [_First, _First + _Count) _Algorithm_int_t<_Diff> _Count = _Count_raw; if (_Count <= 0) { return _First; @@ -935,7 +935,6 @@ namespace ranges { #endif // __cpp_lib_concepts #endif // _HAS_CXX17 - #if _HAS_DEPRECATED_RAW_STORAGE_ITERATOR _EXPORT_STD template class _CXX17_DEPRECATE_RAW_STORAGE_ITERATOR raw_storage_iterator { // wrap stores to raw buffer as output iterator @@ -986,7 +985,6 @@ private: }; #endif // _HAS_DEPRECATED_RAW_STORAGE_ITERATOR - #if _HAS_AUTO_PTR_ETC _EXPORT_STD template class auto_ptr; @@ -1096,7 +1094,6 @@ public: }; #endif // _HAS_AUTO_PTR_ETC - _EXPORT_STD class bad_weak_ptr : public exception { // exception type for invalid use of expired weak_ptr object public: bad_weak_ptr() noexcept {} @@ -3154,7 +3151,6 @@ private: mutable weak_ptr<_Ty> _Wptr; }; - _EXPORT_STD template struct default_delete { // default deleter for unique_ptr constexpr default_delete() noexcept = default; @@ -3459,7 +3455,6 @@ private: _Compressed_pair<_Dx, pointer> _Mypair; }; - _EXPORT_STD template , int> = 0> _NODISCARD_SMART_PTR_ALLOC _CONSTEXPR23 unique_ptr<_Ty> make_unique(_Types&&... _Args) { // make a unique_ptr return unique_ptr<_Ty>(new _Ty(_STD forward<_Types>(_Args)...)); diff --git a/stl/inc/random b/stl/inc/random index b49c005068c..e42f2ecdad2 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -2149,7 +2149,6 @@ private: param_type _Par; }; - // Returns smallest _Flt such that static_cast<_Ty>(_Result) > _Val. // First truncate to largest _Flt <= _Val, then add ceil(ulp). @@ -5064,7 +5063,6 @@ _EXPORT_STD using knuth_b = shuffle_order_engine; _EXPORT_STD using default_random_engine = mt19937; - extern "C++" _CRTIMP2_PURE unsigned int __CLRCALL_PURE_OR_CDECL _Random_device(); _EXPORT_STD class random_device { // class to generate random numbers (from hardware where available) diff --git a/stl/inc/ranges b/stl/inc/ranges index 66e94c498ad..792a55bff70 100644 --- a/stl/inc/ranges +++ b/stl/inc/ranges @@ -1592,8 +1592,7 @@ namespace ranges { _NODISCARD constexpr _Iterator begin() const noexcept /* strengthened */ { return _Iterator{_STD addressof(*_Value)}; } - _NODISCARD constexpr auto end() const noexcept // strengthened - { + _NODISCARD constexpr auto end() const noexcept /* strengthened */ { if constexpr (same_as<_Bo, unreachable_sentinel_t>) { return unreachable_sentinel; } else { diff --git a/stl/inc/xmemory b/stl/inc/xmemory index c809f772e96..5afbb19f38d 100644 --- a/stl/inc/xmemory +++ b/stl/inc/xmemory @@ -2022,7 +2022,7 @@ _CONSTEXPR20 _Alloc_ptr_t<_Alloc> _Uninitialized_value_construct_n( template _NoThrowFwdIt _Uninitialized_value_construct_n_unchecked1(_NoThrowFwdIt _UFirst, _Diff _Count) { - // value-initialize all elements in [_UFirst, _UFirst + _Count_raw) + // value-initialize all elements in [_UFirst, _UFirst + _Count) _STL_INTERNAL_CHECK(_Count >= 0); if constexpr (_Use_memset_value_construct_v<_NoThrowFwdIt>) { return _Zero_range(_UFirst, _UFirst + _Count); diff --git a/stl/inc/xsmf_control.h b/stl/inc/xsmf_control.h index 82898832342..a288c7e3047 100644 --- a/stl/inc/xsmf_control.h +++ b/stl/inc/xsmf_control.h @@ -39,7 +39,6 @@ using _SMF_control_copy = conditional_t< conjunction_v..., negation...>>>, _Non_trivial_copy<_Base>, _Base>; - template struct _Non_trivial_move : _SMF_control_copy<_Base, _Types...> { // non-trivial move construction facade using _Mybase = _SMF_control_copy<_Base, _Types...>; @@ -60,7 +59,6 @@ using _SMF_control_move = conditional_t< conjunction_v..., negation...>>>, _Non_trivial_move<_Base, _Types...>, _SMF_control_copy<_Base, _Types...>>; - template struct _Non_trivial_copy_assign : _SMF_control_move<_Base, _Types...> { // non-trivial copy assignment facade using _Mybase = _SMF_control_move<_Base, _Types...>; @@ -98,7 +96,6 @@ using _SMF_control_copy_assign = conditional_t..., is_copy_assignable<_Types>...>, _Non_trivial_copy_assign<_Base, _Types...>, _Deleted_copy_assign<_Base, _Types...>>>; - template struct _Non_trivial_move_assign : _SMF_control_copy_assign<_Base, _Types...> { // non-trivial move assignment facade using _Mybase = _SMF_control_copy_assign<_Base, _Types...>; @@ -136,7 +133,6 @@ using _SMF_control_move_assign = conditional_t..., is_move_assignable<_Types>...>, _Non_trivial_move_assign<_Base, _Types...>, _Deleted_move_assign<_Base, _Types...>>>; - template using _SMF_control = _SMF_control_move_assign<_Base, _Types...>; diff --git a/stl/inc/xstring b/stl/inc/xstring index cfc53742bc7..f0855bf313f 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -1715,7 +1715,6 @@ _NODISCARD constexpr bool operator!=( return !_Lhs._Equal(_Rhs); } - template _NODISCARD constexpr bool operator<( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1734,7 +1733,6 @@ _NODISCARD constexpr bool operator<( return _Lhs.compare(_Rhs) < 0; } - template _NODISCARD constexpr bool operator>( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1753,7 +1751,6 @@ _NODISCARD constexpr bool operator>( return _Lhs.compare(_Rhs) > 0; } - template _NODISCARD constexpr bool operator<=( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1772,7 +1769,6 @@ _NODISCARD constexpr bool operator<=( return _Lhs.compare(_Rhs) <= 0; } - template _NODISCARD constexpr bool operator>=( const basic_string_view<_Elem, _Traits> _Lhs, const basic_string_view<_Elem, _Traits> _Rhs) noexcept { @@ -1830,7 +1826,6 @@ _EXPORT_STD using u16string_view = basic_string_view; _EXPORT_STD using u32string_view = basic_string_view; _EXPORT_STD using wstring_view = basic_string_view; - template struct hash> : _Conditionally_enabled_hash, _Is_EcharT<_Elem>> { _NODISCARD static size_t _Do_hash(const basic_string_view<_Elem> _Keyval) noexcept { @@ -1844,7 +1839,6 @@ basic_ostream<_Elem, _Traits>& operator<<( return _Insert_string(_Ostr, _Str.data(), _Str.size()); } - inline namespace literals { inline namespace string_view_literals { _EXPORT_STD _NODISCARD constexpr string_view operator""sv(const char* _Str, size_t _Len) noexcept { @@ -3080,7 +3074,6 @@ private: _My_data._Myres = _Right_data._Myres; _My_data._Mysize = _Right_data._Mysize; - _Right._Tidy_init(); } diff --git a/stl/inc/xutility b/stl/inc/xutility index 74782010400..18c27986786 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -4884,7 +4884,6 @@ _CONSTEXPR20 _BidIt2 move_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) return _Dest; } - template struct _Is_character : false_type {}; // by default, not a character type diff --git a/stl/inc/yvals.h b/stl/inc/yvals.h index bcfa5af2199..4f9cf55d90d 100644 --- a/stl/inc/yvals.h +++ b/stl/inc/yvals.h @@ -232,7 +232,6 @@ _STL_DISABLE_CLANG_WARNINGS #define _ATOMIC_REF_CHECK_ALIGNMENT(cond, mesg) _Analysis_assume_(cond) #endif - #include #ifdef _STATIC_CPPLIB diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index 0b6cdf1a024..d3786e63405 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -1490,7 +1490,6 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect #define _HAS_STREAM_INSERTION_OPERATORS_DELETED_IN_CXX20 (_HAS_FEATURES_REMOVED_IN_CXX20) #endif // _HAS_STREAM_INSERTION_OPERATORS_DELETED_IN_CXX20 - #ifndef _HAS_FEATURES_REMOVED_IN_CXX23 #define _HAS_FEATURES_REMOVED_IN_CXX23 (!_HAS_CXX23) #endif // _HAS_FEATURES_REMOVED_IN_CXX23 diff --git a/stl/src/StlCompareStringA.cpp b/stl/src/StlCompareStringA.cpp index 666c8c507f6..281ccdec63b 100644 --- a/stl/src/StlCompareStringA.cpp +++ b/stl/src/StlCompareStringA.cpp @@ -9,7 +9,6 @@ #include "awint.hpp" - // int __cdecl __crtCompareStringA - Get type information about an ANSI string. // // Purpose: diff --git a/stl/src/atomic_wait.cpp b/stl/src/atomic_wait.cpp index 70946fffee5..23622f7990e 100644 --- a/stl/src/atomic_wait.cpp +++ b/stl/src/atomic_wait.cpp @@ -58,7 +58,6 @@ namespace { SRWLOCK* _Locked; }; - #pragma warning(push) #pragma warning(disable : 4324) // structure was padded due to alignment specifier struct alignas(_STD hardware_destructive_interference_size) _Wait_table_entry { @@ -107,7 +106,6 @@ namespace { #else // ^^^ _ATOMIC_WAIT_ON_ADDRESS_STATICALLY_AVAILABLE / !_ATOMIC_WAIT_ON_ADDRESS_STATICALLY_AVAILABLE vvv - struct _Wait_functions_table { _STD atomic _Pfn_WaitOnAddress{nullptr}; _STD atomic _Pfn_WakeByAddressSingle{nullptr}; @@ -221,7 +219,6 @@ namespace { } } // unnamed namespace - _EXTERN_C int __stdcall __std_atomic_wait_direct(const void* const _Storage, void* const _Comparand, const size_t _Size, const unsigned long _Remaining_timeout) noexcept { diff --git a/stl/src/filesys.cpp b/stl/src/filesys.cpp index 5089879fb45..818d78c7f42 100644 --- a/stl/src/filesys.cpp +++ b/stl/src/filesys.cpp @@ -101,7 +101,6 @@ _FS_DLL int __CLRCALL_PURE_OR_CDECL _To_byte(const wchar_t* _Wsrc, char* _Bdest) return WideCharToMultiByte(_Filesys_code_page(), 0, _Wsrc, -1, _Bdest, _MAX_FILESYS_NAME, nullptr, nullptr); } - _FS_DLL void* __CLRCALL_PURE_OR_CDECL _Open_dir( wchar_t (&_Dest)[_MAX_FILESYS_NAME], const wchar_t* _Dirname, int& _Errno, file_type& _Ftype) { // open a directory for reading @@ -139,7 +138,6 @@ _FS_DLL void* __CLRCALL_PURE_OR_CDECL _Open_dir( return _Handle; } - _FS_DLL bool __CLRCALL_PURE_OR_CDECL _Current_get(wchar_t (&_Dest)[_MAX_FILESYS_NAME]) { // get current working directory _Strcpy(_Dest, L""); @@ -172,7 +170,6 @@ _FS_DLL wchar_t* __CLRCALL_PURE_OR_CDECL _Temp_get(wchar_t (&_Dest)[_MAX_FILESYS return _Strcpy(_Dest, __crtGetTempPath2W(MAX_PATH, _Dentry) != 0 ? _Dentry : L"."); } - _FS_DLL int __CLRCALL_PURE_OR_CDECL _Make_dir(const wchar_t* _Fname, const wchar_t*) { // make a new directory (ignore attributes) if (CreateDirectoryW(_Fname, nullptr)) { @@ -218,7 +215,6 @@ _FS_DLL file_type __CLRCALL_PURE_OR_CDECL _Stat(const wchar_t* _Fname, perms* _P } } - _FS_DLL file_type __CLRCALL_PURE_OR_CDECL _Lstat(const wchar_t* _Fname, perms* _Pmode) { // get symlink file status return _Stat(_Fname, _Pmode); // symlink not supported @@ -249,7 +245,6 @@ _FS_DLL uintmax_t __CLRCALL_PURE_OR_CDECL _Hard_links(const wchar_t* _Fname) { #endif // _CRT_APP } - _FS_DLL uintmax_t __CLRCALL_PURE_OR_CDECL _File_size(const wchar_t* _Fname) { // get file size WIN32_FILE_ATTRIBUTE_DATA _Data; @@ -260,7 +255,6 @@ _FS_DLL uintmax_t __CLRCALL_PURE_OR_CDECL _File_size(const wchar_t* _Fname) { // } } - // 3 centuries with 24 leap years each: // 1600 is excluded, 1700/1800 are not leap years // 1 partial century with 17 leap years: @@ -269,11 +263,9 @@ _FS_DLL uintmax_t __CLRCALL_PURE_OR_CDECL _File_size(const wchar_t* _Fname) { // // 1908 is leap year number 2 // 1968 is leap year number 17 - constexpr uint64_t _Win_ticks_per_second = 10000000ULL; constexpr uint64_t _Win_ticks_from_epoch = ((1970 - 1601) * 365 + 3 * 24 + 17) * 86400ULL * _Win_ticks_per_second; - _FS_DLL int64_t __CLRCALL_PURE_OR_CDECL _Last_write_time(const wchar_t* _Fname) { // get last write time WIN32_FILE_ATTRIBUTE_DATA _Data; @@ -287,7 +279,6 @@ _FS_DLL int64_t __CLRCALL_PURE_OR_CDECL _Last_write_time(const wchar_t* _Fname) return static_cast(_Wtime - _Win_ticks_from_epoch); } - _FS_DLL int __CLRCALL_PURE_OR_CDECL _Set_last_write_time(const wchar_t* _Fname, int64_t _When) { // set last write time HANDLE _Handle = _FilesysOpenFile(_Fname, FILE_WRITE_ATTRIBUTES, FILE_FLAG_BACKUP_SEMANTICS); @@ -306,7 +297,6 @@ _FS_DLL int __CLRCALL_PURE_OR_CDECL _Set_last_write_time(const wchar_t* _Fname, return _Result; } - _FS_DLL space_info __CLRCALL_PURE_OR_CDECL _Statvfs(const wchar_t* _Fname) { // get space information for volume space_info _Ans = {static_cast(-1), static_cast(-1), static_cast(-1)}; @@ -328,7 +318,6 @@ _FS_DLL space_info __CLRCALL_PURE_OR_CDECL _Statvfs(const wchar_t* _Fname) { return _Ans; } - _FS_DLL int __CLRCALL_PURE_OR_CDECL _Equivalent( const wchar_t* _Fname1, const wchar_t* _Fname2) { // test for equivalent file names #ifdef _CRT_APP @@ -387,7 +376,6 @@ _FS_DLL int __CLRCALL_PURE_OR_CDECL _Equivalent( #endif // _CRT_APP } - _FS_DLL int __CLRCALL_PURE_OR_CDECL _Link(const wchar_t* _Fname1, const wchar_t* _Fname2) { // link _Fname2 to _Fname1 #ifdef _CRT_APP @@ -432,7 +420,6 @@ _FS_DLL int __CLRCALL_PURE_OR_CDECL _Resize(const wchar_t* _Fname, uintmax_t _Ne return _Ok ? 0 : GetLastError(); } - _FS_DLL int __CLRCALL_PURE_OR_CDECL _Unlink(const wchar_t* _Fname) { // unlink _Fname return _wremove(_Fname) == 0 ? 0 : GetLastError(); } @@ -456,7 +443,6 @@ _FS_DLL int __CLRCALL_PURE_OR_CDECL _Copy_file(const wchar_t* _Fname1, const wch #endif // defined(_ONECORE) } - _FS_DLL int __CLRCALL_PURE_OR_CDECL _Chmod(const wchar_t* _Fname, perms _Newmode) { // change file mode to _Newmode WIN32_FILE_ATTRIBUTE_DATA _Data; diff --git a/stl/src/ios.cpp b/stl/src/ios.cpp index 487ddadc21a..aae748ff0d7 100644 --- a/stl/src/ios.cpp +++ b/stl/src/ios.cpp @@ -20,7 +20,6 @@ _PGLOBAL _CRTDATA2_IMPORT const streamoff _BADOFF = -1; // initialize constant f __PURE_APPDOMAIN_GLOBAL int ios_base::_Index = 0; // initialize source of unique indexes __PURE_APPDOMAIN_GLOBAL bool ios_base::_Sync = true; // initialize synchronization flag - __PURE_APPDOMAIN_GLOBAL static ios_base* stdstr[_Nstdstr + 2] = { nullptr}; // [1, _Nstdstr] hold pointers to standard streams __PURE_APPDOMAIN_GLOBAL static char stdopens[_Nstdstr + 2] = {0}; // [1, _Nstdstr] hold open counts for standard streams diff --git a/stl/src/locale.cpp b/stl/src/locale.cpp index 478278af46d..4c607cf5d8a 100644 --- a/stl/src/locale.cpp +++ b/stl/src/locale.cpp @@ -41,7 +41,6 @@ _MRTIMP2_PURE locale __CLRCALL_PURE_OR_CDECL locale::global(const locale& loc) { _END_LOCK() } - #if STDCPP_IMPLIB || !defined(_M_CEE_PURE) // facets associated with C categories #define ADDFAC(Facet, cat, ptrimp, ptrloc) \ @@ -103,7 +102,6 @@ void __CLRCALL_PURE_OR_CDECL locale::_Locimp::_Locimp_ctor( } #endif // STDCPP_IMPLIB || !defined(_M_CEE_PURE) - void __CLRCALL_PURE_OR_CDECL locale::_Locimp::_Locimp_Addfac( _Locimp* _This, locale::facet* ptrfac, size_t id) { // add a facet to a locale _BEGIN_LOCK(_LOCK_LOCALE) diff --git a/stl/src/multprec.cpp b/stl/src/multprec.cpp index b47a80483b5..6236e33b624 100644 --- a/stl/src/multprec.cpp +++ b/stl/src/multprec.cpp @@ -118,7 +118,6 @@ void __CLRCALL_PURE_OR_CDECL _MP_Rem( _Analysis_assume_(m > 0); _Analysis_assume_(m <= _MP_len - n); - // Knuth, vol. 2, p. 272, Algorithm D // D1: [Normalize.] unsigned long long d = maxVal / (v[n - 1] + 1); diff --git a/stl/src/ppltasks.cpp b/stl/src/ppltasks.cpp index de405dd6cfb..a2e9d72c189 100644 --- a/stl/src/ppltasks.cpp +++ b/stl/src/ppltasks.cpp @@ -86,7 +86,6 @@ namespace Concurrency { using namespace Microsoft::WRL; using namespace Microsoft::WRL::Wrappers; - class AsyncCausalityTracer { IAsyncCausalityTracerStatics* m_causalityAPIs; std::once_flag m_stateFlag; diff --git a/stl/src/special_math.cpp b/stl/src/special_math.cpp index 5e44e1330a2..28d273ad717 100644 --- a/stl/src/special_math.cpp +++ b/stl/src/special_math.cpp @@ -43,7 +43,6 @@ #define _M_X64 #endif // defined(_M_ARM64EC) - #pragma warning(pop) namespace { diff --git a/stl/src/vector_algorithms.cpp b/stl/src/vector_algorithms.cpp index 1a7ad9e0616..82b13133411 100644 --- a/stl/src/vector_algorithms.cpp +++ b/stl/src/vector_algorithms.cpp @@ -1266,7 +1266,6 @@ namespace { return _Find_trivial_unsized_fallback(_First, _Val); } - template const void* __stdcall __std_find_trivial(const void* _First, const void* _Last, _Ty _Val) noexcept { size_t _Size_bytes = _Byte_length(_First, _Last); diff --git a/stl/src/winapisupp.cpp b/stl/src/winapisupp.cpp index 481d7af6005..a54eed524f0 100644 --- a/stl/src/winapisupp.cpp +++ b/stl/src/winapisupp.cpp @@ -120,7 +120,6 @@ extern "C" int __crt_IsPackagedAppHelper() { #endif // defined _ONECORE #endif // defined _CRT_APP - // __crtIsPackagedApp() - Check if the current app is a Packaged app // // Purpose: @@ -153,7 +152,6 @@ extern "C" _CRTIMP2 BOOL __cdecl __crtIsPackagedApp() { #endif // !defined(_CRT_WINDOWS) && !defined(UNDOCKED_WINDOWS_UCRT) - #if _STL_WIN32_WINNT < _WIN32_WINNT_WS03 // TRANSITION, ABI: preserved for binary compatibility @@ -178,7 +176,6 @@ extern "C" BOOL __cdecl __crtFlsSetValue(_In_ DWORD const dwFlsIndex, _In_opt_ P #endif // _STL_WIN32_WINNT < _WIN32_WINNT_WS03 - #if _STL_WIN32_WINNT < _WIN32_WINNT_VISTA // TRANSITION, ABI: preserved for binary compatibility @@ -361,7 +358,6 @@ extern "C" BOOL __cdecl __crtQueueUserWorkItem(_In_ LPTHREAD_START_ROUTINE, _In_ } #endif // _STL_WIN32_WINNT < _WIN32_WINNT_VISTA - #if _STL_WIN32_WINNT < _WIN32_WINNT_WIN7 // TRANSITION, ABI: preserved for binary compatibility extern "C" BOOLEAN __cdecl __crtTryAcquireSRWLockExclusive(_Inout_ PSRWLOCK const pLock) { @@ -370,7 +366,6 @@ extern "C" BOOLEAN __cdecl __crtTryAcquireSRWLockExclusive(_Inout_ PSRWLOCK cons #endif // _STL_WIN32_WINNT < _WIN32_WINNT_WIN7 - #if _STL_WIN32_WINNT < _WIN32_WINNT_WIN8 extern "C" void __cdecl __crtGetSystemTimePreciseAsFileTime(_Out_ LPFILETIME lpSystemTimeAsFileTime) { @@ -399,7 +394,6 @@ extern "C" _Success_(return > 0 && return < BufferLength) DWORD return GetTempPathW(BufferLength, Buffer); } - // Helper to load all necessary Win32 API function pointers #if defined _ONECORE diff --git a/stl/src/xcharconv_tables_float.cpp b/stl/src/xcharconv_tables_float.cpp index 1992bcde52b..abe60e416c1 100644 --- a/stl/src/xcharconv_tables_float.cpp +++ b/stl/src/xcharconv_tables_float.cpp @@ -20,7 +20,6 @@ namespace std { 0x38D1B716u, 0x3A83126Eu, 0x3C23D709u, 0x3DCCCCCCu, 0x3F7FFFFFu, 0x411FFFFFu, 0x42C7FFFFu, 0x4479FFFFu, 0x461C3FFFu, 0x47C34FFFu, 0x497423FFu, 0x4B18967Fu}; - const uint32_t _General_precision_tables_2::_Ordinary_X_table[44] = {0x38D1B717u, 0x3A83126Eu, 0x3C23D70Au, 0x3DCCCCCCu, 0x3F7FFFFFu, 0x411FFFFFu, 0x42C7FFFFu, 0x4479FFFFu, 0x461C3FFFu, 0x47C34FFFu, 0x497423FFu, 0x4B18967Fu, 0x4CBEBC1Fu, 0x4E6E6B27u, 0x501502F8u, 0x51BA43B7u, 0x5368D4A5u, 0x551184E7u, 0x56B5E620u, diff --git a/stl/src/xtime.cpp b/stl/src/xtime.cpp index 1f7109b76f1..2c0e7847b73 100644 --- a/stl/src/xtime.cpp +++ b/stl/src/xtime.cpp @@ -42,7 +42,6 @@ static xtime xtime_diff(const xtime* xt, return diff; } - constexpr long long _Epoch = 0x19DB1DED53E8000LL; constexpr long _Nsec100_per_sec = _Nsec_per_sec / 100; diff --git a/tests/std/tests/Dev11_0437519_container_requirements/test.compile.pass.cpp b/tests/std/tests/Dev11_0437519_container_requirements/test.compile.pass.cpp index ec1cb366a68..466a658ba69 100644 --- a/tests/std/tests/Dev11_0437519_container_requirements/test.compile.pass.cpp +++ b/tests/std/tests/Dev11_0437519_container_requirements/test.compile.pass.cpp @@ -3004,7 +3004,7 @@ DEFINE_TEST_SPECIALIZATION( // // -// Adhoc tests for exception specifications of std::vector (LWG-3778) +// Ad hoc tests for exception specifications of std::vector (LWG-3778) template void assert_vector_bool_noexcept_impl() { using vec_bool = std::vector; diff --git a/tools/unicode_properties_parse/grapheme_break_property_data_gen.py b/tools/unicode_properties_parse/grapheme_break_property_data_gen.py index 316714dcf59..1a029cb6477 100644 --- a/tools/unicode_properties_parse/grapheme_break_property_data_gen.py +++ b/tools/unicode_properties_parse/grapheme_break_property_data_gen.py @@ -228,9 +228,10 @@ def generate_cpp_data(prop_name: str, ranges: list[PropertyRange]) -> str: table = property_ranges_to_table(ranges, prop_values) enumerator_values = [PROP_VALUE_ENUMERATOR_TEMPLATE.format( x) for x in prop_values] - result.write(PROP_VALUE_ENUM_TEMPLATE.format( + result.write(PROP_VALUE_ENUM_TEMPLATE.lstrip().format( prop_name=prop_name, enumerators=",".join(enumerator_values))) - result.write(DATA_ARRAY_TEMPLATE.format(prop_name=prop_name, size=len(table.lower_bounds), + result.write("\n") + result.write(DATA_ARRAY_TEMPLATE.lstrip().format(prop_name=prop_name, size=len(table.lower_bounds), lower_bounds=",".join(["0x" + format(x, 'x') for x in table.lower_bounds]), props_and_size=",".join(["0x" + format(x, 'x') for x in table.props_and_range])))