diff --git a/stl/inc/any b/stl/inc/any index 4e62d1b61..aa42542cc 100644 --- a/stl/inc/any +++ b/stl/inc/any @@ -34,7 +34,7 @@ _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 { + _NODISCARD const char* __CLR_OR_THIS_CALL what() const noexcept override { return "Bad any_cast"; } }; diff --git a/stl/inc/codecvt b/stl/inc/codecvt index 0f7138723..b3ef0eb37 100644 --- a/stl/inc/codecvt +++ b/stl/inc/codecvt @@ -43,11 +43,11 @@ public: explicit codecvt_utf8(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual __CLR_OR_THIS_CALL ~codecvt_utf8() noexcept {} + __CLR_OR_THIS_CALL ~codecvt_utf8() noexcept override {} protected: - virtual result __CLR_OR_THIS_CALL do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, - const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last2) char* _Pstate = reinterpret_cast(&_State); _Mid1 = _First1; @@ -120,8 +120,8 @@ protected: return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result __CLR_OR_THIS_CALL do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, - const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last2) char* _Pstate = reinterpret_cast(&_State); _Mid1 = _First1; @@ -184,7 +184,7 @@ protected: return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result __CLR_OR_THIS_CALL do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::noconv; @@ -192,22 +192,22 @@ protected: friend int _Codecvt_do_length<>(const codecvt_utf8&, _Statype&, const _Byte*, const _Byte*, size_t); - virtual int __CLR_OR_THIS_CALL do_length( + int __CLR_OR_THIS_CALL do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { return _Codecvt_do_length(*this, _State, _First1, _Last1, _Count); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion return (_Mymode & (consume_header | generate_header)) != 0 ? 9 : 6; } - virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override { + int __CLR_OR_THIS_CALL do_encoding() const noexcept override { // return length of code sequence (from codecvt) return (_Mymode & (consume_header | generate_header)) != 0 ? -1 : 0; // -1 => state dependent, 0 => varying length @@ -230,11 +230,11 @@ public: explicit codecvt_utf16(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual __CLR_OR_THIS_CALL ~codecvt_utf16() noexcept {} + __CLR_OR_THIS_CALL ~codecvt_utf16() noexcept override {} protected: - virtual result __CLR_OR_THIS_CALL do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, - const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last2) char* _Pstate = reinterpret_cast(&_State); _Mid1 = _First1; @@ -311,8 +311,8 @@ protected: return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result __CLR_OR_THIS_CALL do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, - const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last2) char* _Pstate = reinterpret_cast(&_State); _Mid1 = _First1; @@ -389,7 +389,7 @@ protected: return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result __CLR_OR_THIS_CALL do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::noconv; @@ -397,22 +397,22 @@ protected: friend int _Codecvt_do_length<>(const codecvt_utf16&, _Statype&, const _Byte*, const _Byte*, size_t); - virtual int __CLR_OR_THIS_CALL do_length( + int __CLR_OR_THIS_CALL do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { return _Codecvt_do_length(*this, _State, _First1, _Last1, _Count); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion return (_Mymode & (consume_header | generate_header)) != 0 ? 3 * _Bytes_per_word : 6 * _Bytes_per_word; } - virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override { + int __CLR_OR_THIS_CALL do_encoding() const noexcept override { // return length of code sequence (from codecvt) if ((_Mymode & (consume_header | generate_header)) != 0) { return -1; // -1 => state dependent @@ -438,11 +438,11 @@ public: explicit codecvt_utf8_utf16(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual __CLR_OR_THIS_CALL ~codecvt_utf8_utf16() noexcept {} + __CLR_OR_THIS_CALL ~codecvt_utf8_utf16() noexcept override {} protected: - virtual result __CLR_OR_THIS_CALL do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, - const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last2) unsigned short* _Pstate = reinterpret_cast(&_State); _Mid1 = _First1; @@ -556,8 +556,8 @@ protected: return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result __CLR_OR_THIS_CALL do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, - const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last2) unsigned short* _Pstate = reinterpret_cast(&_State); _Mid1 = _First1; @@ -631,7 +631,7 @@ protected: return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result __CLR_OR_THIS_CALL do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result __CLR_OR_THIS_CALL do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::noconv; @@ -639,17 +639,17 @@ protected: friend int _Codecvt_do_length<>(const codecvt_utf8_utf16&, _Statype&, const _Byte*, const _Byte*, size_t); - virtual int __CLR_OR_THIS_CALL do_length( + int __CLR_OR_THIS_CALL do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { return _Codecvt_do_length(*this, _State, _First1, _Last1, _Count); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion if ((_Mymode & consume_header) != 0) { return 9; // header + max input @@ -662,7 +662,7 @@ protected: return 6; // 6-byte max input sequence, no 3-byte header } - virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override { + int __CLR_OR_THIS_CALL do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // 0 => varying length } diff --git a/stl/inc/cvt/ebcdic b/stl/inc/cvt/ebcdic index a2bd70202..716419ba1 100644 --- a/stl/inc/cvt/ebcdic +++ b/stl/inc/cvt/ebcdic @@ -40,11 +40,11 @@ namespace stdext { explicit codecvt_ebcdic(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_ebcdic() noexcept {} + ~codecvt_ebcdic() noexcept override {} protected: - virtual result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, - _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { + result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, + _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -61,8 +61,8 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, - _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { + result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, + _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -79,29 +79,28 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::ok; } - virtual int do_length( - _Statype&, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { + int do_length(_Statype&, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) const auto _Wchars = static_cast(_Last1 - _First1); return static_cast(_Count < _Wchars ? _Count : _Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion return 1; } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 1; } }; diff --git a/stl/inc/cvt/euc_0208 b/stl/inc/cvt/euc_0208 index ecc1e5df9..26beb37f0 100644 --- a/stl/inc/cvt/euc_0208 +++ b/stl/inc/cvt/euc_0208 @@ -36,11 +36,11 @@ namespace stdext { explicit codecvt_euc_0208(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_euc_0208() noexcept {} + ~codecvt_euc_0208() noexcept override {} protected: - virtual result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, - _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { + result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, + _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -84,8 +84,8 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, - _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { + result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, + _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -137,14 +137,14 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::ok; } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -176,15 +176,15 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion return 3; } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // 0 => varying length } }; diff --git a/stl/inc/cvt/jis_0208 b/stl/inc/cvt/jis_0208 index 9f5711fb7..0b4f2826c 100644 --- a/stl/inc/cvt/jis_0208 +++ b/stl/inc/cvt/jis_0208 @@ -38,10 +38,10 @@ namespace stdext { explicit codecvt_jis_0208(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_jis_0208() noexcept {} + ~codecvt_jis_0208() noexcept override {} protected: - virtual result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -108,7 +108,7 @@ namespace stdext { return _Ans; } - virtual result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -174,7 +174,7 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype& _State, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype& _State, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state char* _Pstate = reinterpret_cast(&_State); @@ -200,7 +200,7 @@ namespace stdext { return _Mybase::partial; } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -232,15 +232,15 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion return 5; } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // 0 => varying length } }; diff --git a/stl/inc/cvt/one_one b/stl/inc/cvt/one_one index dbcd59e6b..37ea6d14f 100644 --- a/stl/inc/cvt/one_one +++ b/stl/inc/cvt/one_one @@ -43,10 +43,10 @@ namespace stdext { explicit codecvt_one_one(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_one_one() noexcept {} + ~codecvt_one_one() noexcept override {} protected: - virtual result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -109,7 +109,7 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -169,13 +169,13 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::ok; } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -207,11 +207,11 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion if constexpr ((_Mode & (_STD consume_header | _STD generate_header)) != 0) { return 2 * _Bytes_per_word; } else { @@ -219,7 +219,7 @@ namespace stdext { } } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) if constexpr ((_Mode & (_STD consume_header | _STD generate_header)) != 0) { return -1; // -1 => state dependent } else { diff --git a/stl/inc/cvt/sjis_0208 b/stl/inc/cvt/sjis_0208 index d2b2d89ac..77eabf8de 100644 --- a/stl/inc/cvt/sjis_0208 +++ b/stl/inc/cvt/sjis_0208 @@ -37,11 +37,11 @@ namespace stdext { explicit codecvt_sjis_0208(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_sjis_0208() noexcept {} + ~codecvt_sjis_0208() noexcept override {} protected: - virtual result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, - _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { + result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, + _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -88,8 +88,8 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, - _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { + result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, + _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -125,14 +125,14 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::ok; } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -164,15 +164,15 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion return 3; } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // 0 => varying length } }; diff --git a/stl/inc/cvt/utf16 b/stl/inc/cvt/utf16 index 7a53127b7..ec46ba2df 100644 --- a/stl/inc/cvt/utf16 +++ b/stl/inc/cvt/utf16 @@ -41,10 +41,10 @@ namespace stdext { explicit codecvt_utf16(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_utf16() noexcept {} + ~codecvt_utf16() noexcept override {} protected: - virtual result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -118,7 +118,7 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -198,13 +198,13 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::ok; } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -236,11 +236,11 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion if constexpr ((_Mode & (_STD consume_header | _STD generate_header)) != 0) { return 3 * _Bytes_per_word; } else { @@ -248,7 +248,7 @@ namespace stdext { } } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) if constexpr ((_Mode & (_STD consume_header | _STD generate_header)) != 0) { return -1; // -1 => state dependent } else { diff --git a/stl/inc/cvt/utf8 b/stl/inc/cvt/utf8 index d5c50aced..eb1589dfd 100644 --- a/stl/inc/cvt/utf8 +++ b/stl/inc/cvt/utf8 @@ -40,10 +40,10 @@ namespace stdext { explicit codecvt_utf8(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_utf8() noexcept {} + ~codecvt_utf8() noexcept override {} protected: - virtual result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -114,7 +114,7 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -177,13 +177,13 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::ok; } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -215,11 +215,11 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion if constexpr ((_Mode & (_STD consume_header | _STD generate_header)) != 0) { return 9; } else { @@ -227,7 +227,7 @@ namespace stdext { } } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) if constexpr ((_Mode & (_STD consume_header | _STD generate_header)) != 0) { return -1; // -1 => state dependent } else { diff --git a/stl/inc/cvt/utf8_utf16 b/stl/inc/cvt/utf8_utf16 index 7be19d42a..b5f25bfec 100644 --- a/stl/inc/cvt/utf8_utf16 +++ b/stl/inc/cvt/utf8_utf16 @@ -43,10 +43,10 @@ namespace stdext { explicit codecvt_utf8_utf16(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_utf8_utf16() noexcept {} + ~codecvt_utf8_utf16() noexcept override {} protected: - virtual result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last2) unsigned short* _Pstate = reinterpret_cast(&_State); @@ -157,7 +157,7 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) unsigned short* _Pstate = reinterpret_cast(&_State); @@ -233,7 +233,7 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype& _State, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype& _State, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state unsigned short* _Pstate = reinterpret_cast(&_State); _Mid2 = _First2; @@ -241,7 +241,7 @@ namespace stdext { return 1 < *_Pstate ? _Mybase::error : _Mybase::ok; // fail if trailing first word } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -273,11 +273,11 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion if constexpr ((_Mode & _STD consume_header) != 0) { return 9; // header + max input } else if constexpr ((_Mode & _STD generate_header) != 0) { @@ -287,7 +287,7 @@ namespace stdext { } } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // 0 => varying length } }; diff --git a/stl/inc/cvt/wbuffer b/stl/inc/cvt/wbuffer index 823508876..51c58e7ed 100644 --- a/stl/inc/cvt/wbuffer +++ b/stl/inc/cvt/wbuffer @@ -71,7 +71,7 @@ namespace stdext { _Loc = _STD locale(_Loc, _Pcvt); } - virtual ~wbuffer_convert() noexcept { + ~wbuffer_convert() noexcept override { while (_Status == _Wrote) { // put any trailing homing shift if (_Str.size() < _STRING_INC) { _Str.assign(_STRING_INC, '\0'); @@ -128,7 +128,7 @@ namespace stdext { wbuffer_convert& operator=(const wbuffer_convert&) = delete; protected: - virtual int_type overflow(int_type _Meta = _Traits::eof()) { // put an element to stream + int_type overflow(int_type _Meta = _Traits::eof()) override { // put an element to stream if (_Traits::eq_int_type(_Traits::eof(), _Meta)) { return _Traits::not_eof(_Meta); // EOF, return success code } else if (!_Mystrbuf || 0 < _Nback || (_Status != _Unused && _Status != _Wrote)) { @@ -187,7 +187,7 @@ namespace stdext { } } - virtual int_type pbackfail(int_type _Meta = _Traits::eof()) { // put an element back to stream + int_type pbackfail(int_type _Meta = _Traits::eof()) override { // put an element back to stream if (sizeof(_Myback) / sizeof(_Myback[0]) <= _Nback || _Status == _Wrote) { return _Traits::eof(); // nowhere to put back } else { // enough room, put it back @@ -204,7 +204,7 @@ namespace stdext { } } - virtual int_type underflow() { // get an element from stream, but don't point past it + int_type underflow() override { // get an element from stream, but don't point past it int_type _Meta; if (0 >= _Nback) { @@ -221,7 +221,7 @@ namespace stdext { #pragma warning(push) #pragma warning(disable : 6385) // Reading invalid data from 'this->_Myback': // the readable size is 'X' bytes, but 'Y' bytes may be read. - virtual int_type uflow() { // get an element from stream, point past it + int_type uflow() override { // get an element from stream, point past it int_type _Meta; if (0 >= _Nback) { @@ -236,15 +236,15 @@ namespace stdext { } #pragma warning(pop) - virtual pos_type seekoff(off_type, _STD ios_base::seekdir, + pos_type seekoff(off_type, _STD ios_base::seekdir, _STD ios_base::openmode = static_cast<_STD ios_base::openmode>( - _STD ios_base::in | _STD ios_base::out)) { // change position by _Off + _STD ios_base::in | _STD ios_base::out)) override { // change position by _Off return pos_type(-1); // always fail } - virtual pos_type seekpos(pos_type, + pos_type seekpos(pos_type, _STD ios_base::openmode = static_cast<_STD ios_base::openmode>( - _STD ios_base::in | _STD ios_base::out)) { // change position to _Pos + _STD ios_base::in | _STD ios_base::out)) override { // change position to _Pos return pos_type(-1); // always fail } diff --git a/stl/inc/cvt/xjis b/stl/inc/cvt/xjis index e67909703..415f3be98 100644 --- a/stl/inc/cvt/xjis +++ b/stl/inc/cvt/xjis @@ -101,10 +101,10 @@ namespace stdext { explicit codecvt_jis(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~codecvt_jis() noexcept {} + ~codecvt_jis() noexcept override {} protected: - virtual result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, + result do_in(_Statype& _State, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -171,7 +171,7 @@ namespace stdext { return _Ans; } - virtual result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, + result do_out(_Statype& _State, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) char* _Pstate = reinterpret_cast(&_State); @@ -238,7 +238,7 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype& _State, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype& _State, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state char* _Pstate = reinterpret_cast(&_State); @@ -264,7 +264,7 @@ namespace stdext { return _Mybase::partial; } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -296,15 +296,15 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion return 5; } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // 0 => varying length } }; diff --git a/stl/inc/cvt/xone_byte b/stl/inc/cvt/xone_byte index 6afc18d39..bec242218 100644 --- a/stl/inc/cvt/xone_byte +++ b/stl/inc/cvt/xone_byte @@ -37,11 +37,11 @@ namespace stdext { explicit _Cvt_one_byte(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~_Cvt_one_byte() noexcept {} + ~_Cvt_one_byte() noexcept override {} protected: - virtual result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, - _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { + result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, + _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -59,8 +59,8 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, - _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { + result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, + _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -102,29 +102,28 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::ok; } - virtual int do_length( - _Statype&, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { + int do_length(_Statype&, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) const auto _Wchars = static_cast(_Last1 - _First1); return static_cast(_Wchars < _Count ? _Wchars : _Count); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion return 1; // length of sequence } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 1; // >0 => fixed sequence length } }; diff --git a/stl/inc/cvt/xtwo_byte b/stl/inc/cvt/xtwo_byte index f77fc0dd9..749da9a49 100644 --- a/stl/inc/cvt/xtwo_byte +++ b/stl/inc/cvt/xtwo_byte @@ -38,11 +38,11 @@ namespace stdext { explicit _Cvt_two_byte(size_t _Refs = 0) : _Mybase(_Refs) {} - virtual ~_Cvt_two_byte() noexcept {} + ~_Cvt_two_byte() noexcept override {} protected: - virtual result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, - _Elem* _First2, _Elem* _Last2, _Elem*& _Mid2) const override { + result do_in(_Statype&, const _Byte* _First1, const _Byte* _Last1, const _Byte*& _Mid1, _Elem* _First2, + _Elem* _Last2, _Elem*& _Mid2) const override { // convert bytes [_First1, _Last1) to [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -95,8 +95,8 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, - _Byte* _First2, _Byte* _Last2, _Byte*& _Mid2) const override { + result do_out(_Statype&, const _Elem* _First1, const _Elem* _Last1, const _Elem*& _Mid1, _Byte* _First2, + _Byte* _Last2, _Byte*& _Mid2) const override { // convert [_First1, _Last1) to bytes [_First2, _Last) _Mid1 = _First1; _Mid2 = _First2; @@ -146,13 +146,13 @@ namespace stdext { return _First1 == _Mid1 ? _Mybase::partial : _Mybase::ok; } - virtual result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { + result do_unshift(_Statype&, _Byte* _First2, _Byte*, _Byte*& _Mid2) const override { // generate bytes to return to default shift state _Mid2 = _First2; return _Mybase::ok; } - virtual int do_length( + int do_length( _Statype& _State, const _Byte* _First1, const _Byte* _Last1, size_t _Count) const noexcept override { // return min(_Count, converted length of bytes [_First1, _Last1)) size_t _Wchars = 0; @@ -183,15 +183,15 @@ namespace stdext { return static_cast(_Wchars); } - virtual bool do_always_noconv() const noexcept override { // return true if conversions never change input + bool do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int do_max_length() const noexcept override { // return maximum length required for a conversion + int do_max_length() const noexcept override { // return maximum length required for a conversion return _Table::_Nbytes; // length of sequence } - virtual int do_encoding() const noexcept override { // return length of code sequence (from codecvt) + int do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // 0 => varying length } }; diff --git a/stl/inc/exception b/stl/inc/exception index 5c9fdcd8c..7f0d28f50 100644 --- a/stl/inc/exception +++ b/stl/inc/exception @@ -124,10 +124,10 @@ 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) {} - virtual __CLR_OR_THIS_CALL ~bad_exception() noexcept {} + __CLR_OR_THIS_CALL ~bad_exception() noexcept override {} protected: - virtual void __CLR_OR_THIS_CALL _Doraise() const override { // raise this exception + void __CLR_OR_THIS_CALL _Doraise() const override { // raise this exception _RAISE(*this); } }; @@ -138,7 +138,7 @@ public: __CLR_OR_THIS_CALL bad_alloc() noexcept : exception("bad allocation", 1) {} // construct from message string with no memory allocation - virtual __CLR_OR_THIS_CALL ~bad_alloc() noexcept {} + __CLR_OR_THIS_CALL ~bad_alloc() noexcept override {} private: friend class bad_array_new_length; @@ -147,7 +147,7 @@ private: : exception(_Message, 1) {} // construct from message string with no memory allocation protected: - virtual void __CLR_OR_THIS_CALL _Doraise() const override { // perform class-specific exception handling + void __CLR_OR_THIS_CALL _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } }; diff --git a/stl/inc/execution b/stl/inc/execution index 5ee5c6b98..04dfd614a 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -140,14 +140,14 @@ struct is_execution_policy : true_type {}; // STRUCT _Parallelism_resources_exhausted struct _Parallelism_resources_exhausted : exception { - _NODISCARD virtual const char* __CLR_OR_THIS_CALL what() const noexcept override { + _NODISCARD const char* __CLR_OR_THIS_CALL what() const noexcept override { // return pointer to message string return "Insufficient resources were available to use additional parallelism."; } #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS diff --git a/stl/inc/experimental/filesystem b/stl/inc/experimental/filesystem index caea6224a..4a2a64679 100644 --- a/stl/inc/experimental/filesystem +++ b/stl/inc/experimental/filesystem @@ -1336,7 +1336,7 @@ public: filesystem_error(const string& _Message, const path& _Path1, const path& _Path2, error_code _Errcode) : system_error(_Errcode, _Message), _Mypval1(_Path1), _Mypval2(_Path2) {} - virtual __CLR_OR_THIS_CALL ~filesystem_error() noexcept {} + __CLR_OR_THIS_CALL ~filesystem_error() noexcept override {} filesystem_error(filesystem_error&& _Right) noexcept : system_error(_Right.code(), _Right.what()), _Mypval1(_STD move(_Right._Mypval1)), @@ -1366,7 +1366,7 @@ private: #if !_HAS_EXCEPTIONS protected: - virtual __CLR_OR_THIS_CALL void _Doraise() const override { // perform class-specific exception handling + __CLR_OR_THIS_CALL void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS diff --git a/stl/inc/filesystem b/stl/inc/filesystem index 3c91851c7..65e77ea8c 100644 --- a/stl/inc/filesystem +++ b/stl/inc/filesystem @@ -1813,7 +1813,7 @@ namespace filesystem { return _Path2; } - _NODISCARD virtual const char* what() const noexcept override { + _NODISCARD const char* what() const noexcept override { return _What.c_str(); } @@ -1844,7 +1844,7 @@ namespace filesystem { #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS diff --git a/stl/inc/fstream b/stl/inc/fstream index 7a5b704cf..d2e3ea7be 100644 --- a/stl/inc/fstream +++ b/stl/inc/fstream @@ -179,7 +179,7 @@ public: _Init(_File, _Newfl); } - virtual __CLR_OR_THIS_CALL ~basic_filebuf() noexcept { + __CLR_OR_THIS_CALL ~basic_filebuf() noexcept override { if (_Myfile) { _Reset_back(); // revert from _Mychar buffer } @@ -402,20 +402,20 @@ public: return _Ans; } - virtual void __CLR_OR_THIS_CALL _Lock() override { // lock file instead of stream buffer + void __CLR_OR_THIS_CALL _Lock() override { // lock file instead of stream buffer if (_Myfile) { _CSTD _lock_file(_Myfile); } } - virtual void __CLR_OR_THIS_CALL _Unlock() override { // unlock file instead of stream buffer + void __CLR_OR_THIS_CALL _Unlock() override { // unlock file instead of stream buffer if (_Myfile) { _CSTD _unlock_file(_Myfile); } } protected: - virtual int_type __CLR_OR_THIS_CALL overflow(int_type _Meta = _Traits::eof()) override { // put an element to stream + int_type __CLR_OR_THIS_CALL overflow(int_type _Meta = _Traits::eof()) override { // put an element to stream if (_Traits::eq_int_type(_Traits::eof(), _Meta)) { return _Traits::not_eof(_Meta); // EOF, return success code } @@ -467,7 +467,7 @@ protected: } } - virtual int_type __CLR_OR_THIS_CALL pbackfail(int_type _Meta = _Traits::eof()) override { + int_type __CLR_OR_THIS_CALL pbackfail(int_type _Meta = _Traits::eof()) override { // put an element back to stream if (_Mysb::gptr() && _Mysb::eback() < _Mysb::gptr() && (_Traits::eq_int_type(_Traits::eof(), _Meta) @@ -488,7 +488,7 @@ protected: } } - virtual int_type __CLR_OR_THIS_CALL underflow() override { // get an element from stream, but don't point past it + int_type __CLR_OR_THIS_CALL underflow() override { // get an element from stream, but don't point past it int_type _Meta; if (_Mysb::gptr() && _Mysb::gptr() < _Mysb::egptr()) { return _Traits::to_int_type(*_Mysb::gptr()); // return buffered @@ -500,7 +500,7 @@ protected: } } - virtual int_type __CLR_OR_THIS_CALL uflow() override { // get an element from stream, point past it + int_type __CLR_OR_THIS_CALL uflow() override { // get an element from stream, point past it if (_Mysb::gptr() && _Mysb::gptr() < _Mysb::egptr()) { return _Traits::to_int_type(*_Mysb::_Gninc()); // return buffered } @@ -558,7 +558,7 @@ protected: #pragma warning(push) #pragma warning(disable : 4127) // conditional expression is constant - virtual streamsize __CLR_OR_THIS_CALL xsgetn(_Elem* _Ptr, streamsize _Count) override { + streamsize __CLR_OR_THIS_CALL xsgetn(_Elem* _Ptr, streamsize _Count) override { // get _Count characters from stream if constexpr (sizeof(_Elem) == 1) { if (_Count <= 0) { @@ -606,7 +606,7 @@ protected: } } - virtual streamsize __CLR_OR_THIS_CALL xsputn(const _Elem* _Ptr, streamsize _Count) override { + streamsize __CLR_OR_THIS_CALL xsputn(const _Elem* _Ptr, streamsize _Count) override { // put _Count characters to stream if constexpr (sizeof(_Elem) == 1) { if (_Pcvt) { // if we need a nontrivial codecvt transform, do the default expensive thing @@ -637,7 +637,7 @@ protected: } #pragma warning(pop) - virtual pos_type __CLR_OR_THIS_CALL seekoff(off_type _Off, ios_base::seekdir _Way, + pos_type __CLR_OR_THIS_CALL seekoff(off_type _Off, ios_base::seekdir _Way, ios_base::openmode = ios_base::in | ios_base::out) override { // change position by _Off fpos_t _Fileposition; @@ -657,8 +657,7 @@ protected: return pos_type(_State, _Fileposition); // return new position } - virtual pos_type __CLR_OR_THIS_CALL seekpos( - pos_type _Pos, ios_base::openmode = ios_base::in | ios_base::out) override { + pos_type __CLR_OR_THIS_CALL seekpos(pos_type _Pos, ios_base::openmode = ios_base::in | ios_base::out) override { // change position to _Pos off_type _Off = static_cast(_Pos); @@ -671,7 +670,7 @@ protected: return pos_type(_State, _Off); // return new position } - virtual _Mysb* __CLR_OR_THIS_CALL setbuf(_Elem* _Buffer, streamsize _Count) override { // offer _Buffer to C stream + _Mysb* __CLR_OR_THIS_CALL setbuf(_Elem* _Buffer, streamsize _Count) override { // offer _Buffer to C stream int _Mode; if (!_Buffer && _Count == 0) { _Mode = _IONBF; @@ -690,7 +689,7 @@ protected: return this; } - virtual int __CLR_OR_THIS_CALL sync() override { // synchronize C stream with external file + int __CLR_OR_THIS_CALL sync() override { // synchronize C stream with external file if (!_Myfile || _Traits::eq_int_type(_Traits::eof(), overflow()) || 0 <= _CSTD fflush(_Myfile)) { return 0; } @@ -698,7 +697,7 @@ protected: return -1; } - virtual void __CLR_OR_THIS_CALL imbue(const locale& _Loc) override { + void __CLR_OR_THIS_CALL imbue(const locale& _Loc) override { // set locale to argument (capture nontrivial codecvt facet) _Initcvt(_STD use_facet<_Cvt>(_Loc)); } @@ -945,7 +944,7 @@ public: #endif // _HAS_OLD_IOSTREAMS_MEMBERS #endif // _NATIVE_WCHAR_T_DEFINED - virtual __CLR_OR_THIS_CALL ~basic_ifstream() noexcept {} + __CLR_OR_THIS_CALL ~basic_ifstream() noexcept override {} _NODISCARD _Myfb* rdbuf() const { return const_cast<_Myfb*>(_STD addressof(_Filebuffer)); @@ -1129,7 +1128,7 @@ public: #endif // _HAS_OLD_IOSTREAMS_MEMBERS #endif // _NATIVE_WCHAR_T_DEFINED - virtual __CLR_OR_THIS_CALL ~basic_ofstream() noexcept {} + __CLR_OR_THIS_CALL ~basic_ofstream() noexcept override {} _NODISCARD _Myfb* rdbuf() const { return const_cast<_Myfb*>(_STD addressof(_Filebuffer)); @@ -1319,7 +1318,7 @@ public: #endif // _HAS_OLD_IOSTREAMS_MEMBERS #endif // _NATIVE_WCHAR_T_DEFINED - virtual __CLR_OR_THIS_CALL ~basic_fstream() noexcept {} + __CLR_OR_THIS_CALL ~basic_fstream() noexcept override {} _NODISCARD _Myfb* rdbuf() const { return const_cast<_Myfb*>(_STD addressof(_Filebuffer)); diff --git a/stl/inc/functional b/stl/inc/functional index dc2a4f7df..e9a5ca6e7 100644 --- a/stl/inc/functional +++ b/stl/inc/functional @@ -722,7 +722,7 @@ class bad_function_call : public exception { // exception thrown when an empty s public: bad_function_call() noexcept {} - _NODISCARD virtual const char* __CLR_OR_THIS_CALL what() const noexcept override { + _NODISCARD const char* __CLR_OR_THIS_CALL what() const noexcept override { // return pointer to message string return "bad function call"; } @@ -831,7 +831,7 @@ public: // dtor non-virtual due to _Delete_this() private: - virtual _Mybase* _Copy(void* _Where) const override { + _Mybase* _Copy(void* _Where) const override { auto& _Myax = _Mypair._Get_first(); if constexpr (_Is_large<_Func_impl>) { _Myalty _Rebound(_Myax); @@ -846,7 +846,7 @@ private: } } - virtual _Mybase* _Move(void* _Where) noexcept override { + _Mybase* _Move(void* _Where) noexcept override { if constexpr (_Is_large<_Func_impl>) { return nullptr; } else { @@ -856,11 +856,11 @@ private: } } - virtual _Rx _Do_call(_Types&&... _Args) override { // call wrapped function + _Rx _Do_call(_Types&&... _Args) override { // call wrapped function return _Invoker_ret<_Rx>::_Call(_Mypair._Myval2, _STD forward<_Types>(_Args)...); } - virtual const type_info& _Target_type() const noexcept override { + const type_info& _Target_type() const noexcept override { #if _HAS_STATIC_RTTI return typeid(_Callable); #else // _HAS_STATIC_RTTI @@ -868,11 +868,11 @@ private: #endif // _HAS_STATIC_RTTI } - virtual const void* _Get() const noexcept override { + const void* _Get() const noexcept override { return _STD addressof(_Mypair._Myval2); } - virtual void _Delete_this(bool _Deallocate) noexcept override { // destroy self + void _Delete_this(bool _Deallocate) noexcept override { // destroy self _Myalty _Al(_Mypair._Get_first()); _Destroy_in_place(*this); if (_Deallocate) { @@ -898,7 +898,7 @@ public: // dtor non-virtual due to _Delete_this() private: - virtual _Mybase* _Copy(void* _Where) const override { + _Mybase* _Copy(void* _Where) const override { if constexpr (_Is_large<_Func_impl_no_alloc>) { (void) _Where; // TRANSITION, DevCom-1004719 return _Global_new<_Func_impl_no_alloc>(_Callee); @@ -907,7 +907,7 @@ private: } } - virtual _Mybase* _Move(void* _Where) noexcept override { + _Mybase* _Move(void* _Where) noexcept override { if constexpr (_Is_large<_Func_impl_no_alloc>) { (void) _Where; // TRANSITION, DevCom-1004719 return nullptr; @@ -916,11 +916,11 @@ private: } } - virtual _Rx _Do_call(_Types&&... _Args) override { // call wrapped function + _Rx _Do_call(_Types&&... _Args) override { // call wrapped function return _Invoker_ret<_Rx>::_Call(_Callee, _STD forward<_Types>(_Args)...); } - virtual const type_info& _Target_type() const noexcept override { + const type_info& _Target_type() const noexcept override { #if _HAS_STATIC_RTTI return typeid(_Callable); #else // _HAS_STATIC_RTTI @@ -928,11 +928,11 @@ private: #endif // _HAS_STATIC_RTTI } - virtual const void* _Get() const noexcept override { + const void* _Get() const noexcept override { return _STD addressof(_Callee); } - virtual void _Delete_this(bool _Dealloc) noexcept override { // destroy self + void _Delete_this(bool _Dealloc) noexcept override { // destroy self this->~_Func_impl_no_alloc(); if (_Dealloc) { _Deallocate(this, sizeof(_Func_impl_no_alloc)); diff --git a/stl/inc/future b/stl/inc/future index b14aa5b44..5bd896389 100644 --- a/stl/inc/future +++ b/stl/inc/future @@ -134,13 +134,13 @@ public: return _Mycode; } - _NODISCARD virtual const char* __CLR_OR_THIS_CALL what() const noexcept override { // get message string + _NODISCARD const char* __CLR_OR_THIS_CALL what() const noexcept override { // get message string return _Future_error_map(_Mycode.value()); } #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -153,11 +153,11 @@ class _Future_error_category2 : public error_category { // categorize a future e public: constexpr _Future_error_category2() noexcept : error_category(_Future_addr) {} - virtual const char* name() const noexcept override { + const char* name() const noexcept override { return "future"; } - virtual string message(int _Errcode) const override { + string message(int _Errcode) const override { const char* _Name = _Future_error_map(_Errcode); if (_Name) { return _Name; @@ -188,7 +188,7 @@ struct _State_deleter : _Deleter_base<_Ty> { // manage allocator and deletion st _State_deleter(const _State_deleter&) = delete; _State_deleter& operator=(const _State_deleter&) = delete; - virtual void _Delete(_Associated_state<_Ty>* _State) override; + void _Delete(_Associated_state<_Ty>* _State) override; _Alloc _My_alloc; }; @@ -660,12 +660,12 @@ public: _Deferred_async_state(_Fty2&& _Fnarg) : _Packaged_state<_Rx()>(_STD forward<_Fty2>(_Fnarg)) {} private: - virtual bool _Has_deferred_function() const noexcept override { + bool _Has_deferred_function() const noexcept override { // this function is considered to be deferred until it's invoked return !this->_Running; } - virtual void _Run_deferred_function(unique_lock& _Lock) override { // run the deferred function + void _Run_deferred_function(unique_lock& _Lock) override { // run the deferred function _Lock.unlock(); _Packaged_state<_Rx()>::_Call_immediate(); _Lock.lock(); @@ -689,15 +689,15 @@ public: this->_Running = true; } - virtual ~_Task_async_state() noexcept { + ~_Task_async_state() noexcept override { _Wait(); } - virtual void _Wait() override { // wait for completion + void _Wait() override { // wait for completion _Task.wait(); } - virtual _State_type& _Get_value(bool _Get_only_once) override { + _State_type& _Get_value(bool _Get_only_once) override { // return the stored result or throw stored exception _Task.wait(); return _Mybase::_Get_value(_Get_only_once); diff --git a/stl/inc/ios b/stl/inc/ios index fb85b4605..db43270f4 100644 --- a/stl/inc/ios +++ b/stl/inc/ios @@ -35,7 +35,7 @@ public: init(_Strbuf); } - virtual __CLR_OR_THIS_CALL ~basic_ios() noexcept {} + __CLR_OR_THIS_CALL ~basic_ios() noexcept override {} void __CLR_OR_THIS_CALL clear(iostate _State = goodbit, bool _Reraise = false) { // set state, possibly reraise exception diff --git a/stl/inc/istream b/stl/inc/istream index 62b687c23..9a6af354b 100644 --- a/stl/inc/istream +++ b/stl/inc/istream @@ -69,7 +69,7 @@ public: __CLR_OR_THIS_CALL basic_istream(const basic_istream&) = delete; basic_istream& __CLR_OR_THIS_CALL operator=(const basic_istream&) = delete; - virtual __CLR_OR_THIS_CALL ~basic_istream() noexcept {} + __CLR_OR_THIS_CALL ~basic_istream() noexcept override {} using int_type = typename _Traits::int_type; using pos_type = typename _Traits::pos_type; @@ -743,7 +743,7 @@ public: __CLR_OR_THIS_CALL basic_iostream(const basic_iostream&) = delete; basic_iostream& __CLR_OR_THIS_CALL operator=(const basic_iostream&) = delete; - virtual __CLR_OR_THIS_CALL ~basic_iostream() noexcept {} + __CLR_OR_THIS_CALL ~basic_iostream() noexcept override {} }; #if defined(_DLL_CPPLIB) diff --git a/stl/inc/locale b/stl/inc/locale index fb99b7439..27ebb80f6 100644 --- a/stl/inc/locale +++ b/stl/inc/locale @@ -68,7 +68,7 @@ public: } protected: - __CLR_OR_THIS_CALL ~collate() noexcept { + __CLR_OR_THIS_CALL ~collate() noexcept override { _CSTD free(_Coll._LocaleName); } @@ -156,7 +156,7 @@ public: : collate<_Elem>(_Locinfo(_Str.c_str()), _Refs) {} // construct for named locale protected: - virtual __CLR_OR_THIS_CALL ~collate_byname() noexcept {} + __CLR_OR_THIS_CALL ~collate_byname() noexcept override {} }; // FUNCTION TEMPLATE has_facet diff --git a/stl/inc/memory b/stl/inc/memory index 9da84c51c..80700e7eb 100644 --- a/stl/inc/memory +++ b/stl/inc/memory @@ -1062,7 +1062,7 @@ class bad_weak_ptr : public exception { // exception type for invalid use of exp public: bad_weak_ptr() noexcept {} - _NODISCARD virtual const char* __CLR_OR_THIS_CALL what() const noexcept override { + _NODISCARD const char* __CLR_OR_THIS_CALL what() const noexcept override { // return pointer to message string return "bad_weak_ptr"; } @@ -1157,11 +1157,11 @@ public: explicit _Ref_count(_Ty* _Px) : _Ref_count_base(), _Ptr(_Px) {} private: - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource delete _Ptr; } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self delete this; } @@ -1176,12 +1176,12 @@ public: : _Ref_count_base(), _Mypair(_One_then_variadic_args_t{}, _STD move(_Dt), _Px) {} #ifdef __EDG__ // TRANSITION, VSO-1292293 - virtual ~_Ref_count_resource() noexcept override {} // TRANSITION, should be non-virtual + ~_Ref_count_resource() noexcept override {} // TRANSITION, should be non-virtual #else // ^^^ workaround / no workaround vvv - virtual ~_Ref_count_resource() noexcept override = default; // TRANSITION, should be non-virtual + ~_Ref_count_resource() noexcept override = default; // TRANSITION, should be non-virtual #endif // ^^^ no workaround ^^^ - virtual void* _Get_deleter(const type_info& _Typeid) const noexcept override { + void* _Get_deleter(const type_info& _Typeid) const noexcept override { #if _HAS_STATIC_RTTI if (_Typeid == typeid(_Dx)) { return const_cast<_Dx*>(_STD addressof(_Mypair._Get_first())); @@ -1194,11 +1194,11 @@ public: } private: - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource _Mypair._Get_first()(_Mypair._Myval2); } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self delete this; } @@ -1215,12 +1215,12 @@ public: _Mypair(_One_then_variadic_args_t{}, _STD move(_Dt), _One_then_variadic_args_t{}, _Ax, _Px) {} #ifdef __EDG__ // TRANSITION, VSO-1292293 - virtual ~_Ref_count_resource_alloc() noexcept override {} // TRANSITION, should be non-virtual + ~_Ref_count_resource_alloc() noexcept override {} // TRANSITION, should be non-virtual #else // ^^^ workaround / no workaround vvv - virtual ~_Ref_count_resource_alloc() noexcept override = default; // TRANSITION, should be non-virtual + ~_Ref_count_resource_alloc() noexcept override = default; // TRANSITION, should be non-virtual #endif // ^^^ no workaround ^^^ - virtual void* _Get_deleter(const type_info& _Typeid) const noexcept override { + void* _Get_deleter(const type_info& _Typeid) const noexcept override { #if _HAS_STATIC_RTTI if (_Typeid == typeid(_Dx)) { return const_cast<_Dx*>(_STD addressof(_Mypair._Get_first())); @@ -1235,11 +1235,11 @@ public: private: using _Myalty = _Rebind_alloc_t<_Alloc, _Ref_count_resource_alloc>; - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource _Mypair._Get_first()(_Mypair._Myval2._Myval2); } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self _Myalty _Al = _Mypair._Myval2._Get_first(); this->~_Ref_count_resource_alloc(); _Deallocate_plain(_Al, this); @@ -2055,7 +2055,7 @@ public: } } - virtual ~_Ref_count_obj2() noexcept override { // TRANSITION, should be non-virtual + ~_Ref_count_obj2() noexcept override { // TRANSITION, should be non-virtual // nothing to do, _Storage._Value was already destroyed in _Destroy // N4849 [class.dtor]/7: @@ -2068,11 +2068,11 @@ public: }; private: - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource _Destroy_in_place(_Storage._Value); } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self delete this; } }; @@ -2319,17 +2319,17 @@ private: _Wrap<_Element_type> _Storage; // flexible array must be last member }; - virtual ~_Ref_count_unbounded_array() noexcept override { // TRANSITION, should be non-virtual + ~_Ref_count_unbounded_array() noexcept override { // TRANSITION, should be non-virtual // nothing to do, _Ty is trivially destructible // See N4849 [class.dtor]/7. } - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource // nothing to do, _Ty is trivially destructible } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self this->~_Ref_count_unbounded_array(); _Deallocate_flexible_array(this); } @@ -2367,17 +2367,17 @@ private: _Wrap<_Element_type> _Storage; // flexible array must be last member }; - virtual ~_Ref_count_unbounded_array() noexcept override { // TRANSITION, should be non-virtual + ~_Ref_count_unbounded_array() noexcept override { // TRANSITION, should be non-virtual // nothing to do, _Storage was already destroyed in _Destroy // See N4849 [class.dtor]/7. } - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource _Reverse_destroy_multidimensional_n(_Get_ptr(), _Size); } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self this->~_Ref_count_unbounded_array(); _Deallocate_flexible_array(this); } @@ -2406,17 +2406,17 @@ public: }; private: - virtual ~_Ref_count_bounded_array() noexcept override { // TRANSITION, should be non-virtual + ~_Ref_count_bounded_array() noexcept override { // TRANSITION, should be non-virtual // nothing to do, _Storage was already destroyed in _Destroy // See N4849 [class.dtor]/7. } - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource _Destroy_in_place(_Storage); // not _Storage._Value, see N4849 [expr.prim.id.dtor] } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self delete this; } }; @@ -2492,17 +2492,17 @@ public: }; private: - virtual ~_Ref_count_obj_alloc3() noexcept override { // TRANSITION, should be non-virtual + ~_Ref_count_obj_alloc3() noexcept override { // TRANSITION, should be non-virtual // nothing to do; _Storage._Value already destroyed by _Destroy() // See N4849 [class.dtor]/7. } - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource allocator_traits<_Rebound>::destroy(this->_Get_val(), _STD addressof(_Storage._Value)); } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self _Rebind_alloc_t<_Alloc, _Ref_count_obj_alloc3> _Al(this->_Get_val()); this->~_Ref_count_obj_alloc3(); _Deallocate_plain(_Al, this); @@ -2680,19 +2680,19 @@ private: _Wrap<_Element_type> _Storage; // flexible array must be last member }; - virtual ~_Ref_count_unbounded_array_alloc() noexcept override { // TRANSITION, should be non-virtual + ~_Ref_count_unbounded_array_alloc() noexcept override { // TRANSITION, should be non-virtual // nothing to do; _Storage._Value already destroyed by _Destroy() // See N4849 [class.dtor]/7. } - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource if constexpr (!conjunction_v, _Uses_default_destroy<_Rebound, _Item*>>) { _Reverse_destroy_multidimensional_n_al(_Get_ptr(), _Size, this->_Get_val()); } } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self constexpr size_t _Align = alignof(_Ref_count_unbounded_array_alloc); using _Storage = _Alignas_storage_unit<_Align>; @@ -2741,19 +2741,19 @@ public: }; private: - virtual ~_Ref_count_bounded_array_alloc() noexcept override { // TRANSITION, should be non-virtual + ~_Ref_count_bounded_array_alloc() noexcept override { // TRANSITION, should be non-virtual // nothing to do; _Storage._Value already destroyed by _Destroy() // See N4849 [class.dtor]/7. } - virtual void _Destroy() noexcept override { // destroy managed resource + void _Destroy() noexcept override { // destroy managed resource if constexpr (!conjunction_v, _Uses_default_destroy<_Rebound, _Item*>>) { _Reverse_destroy_multidimensional_n_al(_Storage._Value, extent_v<_Ty>, this->_Get_val()); } } - virtual void _Delete_this() noexcept override { // destroy self + void _Delete_this() noexcept override { // destroy self _Rebind_alloc_t<_Alloc, _Ref_count_bounded_array_alloc> _Al(this->_Get_val()); this->~_Ref_count_bounded_array_alloc(); _Deallocate_plain(_Al, this); diff --git a/stl/inc/memory_resource b/stl/inc/memory_resource index 386122fab..c9df19def 100644 --- a/stl/inc/memory_resource +++ b/stl/inc/memory_resource @@ -49,14 +49,14 @@ namespace pmr { // FUNCTION new_delete_resource class _Identity_equal_resource : public memory_resource { protected: - virtual bool do_is_equal(const memory_resource& _That) const noexcept override { + bool do_is_equal(const memory_resource& _That) const noexcept override { return this == &_That; } }; class _Unaligned_new_delete_resource_impl final : public _Identity_equal_resource { // implementation for new_delete_resource with /Zc:alignedNew- - virtual void* do_allocate(const size_t _Bytes, const size_t _Align) override { + void* do_allocate(const size_t _Bytes, const size_t _Align) override { if (_Align > __STDCPP_DEFAULT_NEW_ALIGNMENT__) { _Xbad_alloc(); } @@ -64,7 +64,7 @@ namespace pmr { return ::operator new(_Bytes); } - virtual void do_deallocate(void* const _Ptr, const size_t _Bytes, size_t) noexcept override /* strengthened */ { + void do_deallocate(void* const _Ptr, const size_t _Bytes, size_t) noexcept override /* strengthened */ { ::operator delete(_Ptr, _Bytes); } }; @@ -74,7 +74,7 @@ namespace pmr { #ifdef __cpp_aligned_new class _Aligned_new_delete_resource_impl final : public _Identity_equal_resource { // implementation for new_delete_resource with aligned new support - virtual void* do_allocate(const size_t _Bytes, const size_t _Align) override { + void* do_allocate(const size_t _Bytes, const size_t _Align) override { if (_Align > __STDCPP_DEFAULT_NEW_ALIGNMENT__) { return ::operator new (_Bytes, align_val_t{_Align}); } @@ -82,7 +82,7 @@ namespace pmr { return ::operator new(_Bytes); } - virtual void do_deallocate(void* const _Ptr, const size_t _Bytes, const size_t _Align) noexcept override + void do_deallocate(void* const _Ptr, const size_t _Bytes, const size_t _Align) noexcept override /* strengthened */ { if (_Align > __STDCPP_DEFAULT_NEW_ALIGNMENT__) { return ::operator delete (_Ptr, _Bytes, align_val_t{_Align}); @@ -257,7 +257,7 @@ namespace pmr { unsynchronized_pool_resource(const unsynchronized_pool_resource&) = delete; unsynchronized_pool_resource& operator=(const unsynchronized_pool_resource&) = delete; - virtual ~unsynchronized_pool_resource() noexcept override { + ~unsynchronized_pool_resource() noexcept override { // destroy this pool resource, releasing all allocations back upstream release(); } @@ -291,7 +291,7 @@ namespace pmr { } protected: - virtual void* do_allocate(size_t _Bytes, const size_t _Align) override { + void* do_allocate(size_t _Bytes, const size_t _Align) override { // allocate a block from the appropriate pool, or directly from upstream if too large if (_Bytes <= _Options.largest_required_pool_block) { auto _Result = _Find_pool(_Bytes, _Align); @@ -305,7 +305,7 @@ namespace pmr { return _Allocate_oversized(_Bytes, _Align); } - virtual void do_deallocate(void* const _Ptr, const size_t _Bytes, const size_t _Align) override { + void do_deallocate(void* const _Ptr, const size_t _Bytes, const size_t _Align) override { // deallocate a block from the appropriate pool, or directly from upstream if too large if (_Bytes <= _Options.largest_required_pool_block) { const auto _Result = _Find_pool(_Bytes, _Align); @@ -582,12 +582,12 @@ namespace pmr { } protected: - virtual void* do_allocate(const size_t _Bytes, const size_t _Align) override { + void* do_allocate(const size_t _Bytes, const size_t _Align) override { lock_guard _Guard{_Mtx}; return this->unsynchronized_pool_resource::do_allocate(_Bytes, _Align); } - virtual void do_deallocate(void* const _Ptr, const size_t _Bytes, const size_t _Align) override { + void do_deallocate(void* const _Ptr, const size_t _Bytes, const size_t _Align) override { lock_guard _Guard{_Mtx}; this->unsynchronized_pool_resource::do_deallocate(_Ptr, _Bytes, _Align); } @@ -626,7 +626,7 @@ namespace pmr { // initialize this resource with initial buffer } - virtual ~monotonic_buffer_resource() noexcept override { + ~monotonic_buffer_resource() noexcept override { release(); } @@ -661,7 +661,7 @@ namespace pmr { } protected: - virtual void* do_allocate(const size_t _Bytes, const size_t _Align) override { + void* do_allocate(const size_t _Bytes, const size_t _Align) override { // allocate from the current buffer or a new larger buffer from upstream if (!_STD align(_Align, _Bytes, _Current_buffer, _Space_available)) { _Increase_capacity(_Bytes, _Align); @@ -673,7 +673,7 @@ namespace pmr { return _Result; } - virtual void do_deallocate(void*, size_t, size_t) override {} // nothing to do + void do_deallocate(void*, size_t, size_t) override {} // nothing to do private: struct _Header : _Single_link<> { // track the size and alignment of an allocation from upstream diff --git a/stl/inc/optional b/stl/inc/optional index e007eb5d3..2e0328890 100644 --- a/stl/inc/optional +++ b/stl/inc/optional @@ -40,13 +40,13 @@ 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 { + _NODISCARD const char* __CLR_OR_THIS_CALL what() const noexcept override { return "Bad optional access"; } #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS diff --git a/stl/inc/ostream b/stl/inc/ostream index 61766bf31..87c0b35d1 100644 --- a/stl/inc/ostream +++ b/stl/inc/ostream @@ -60,7 +60,7 @@ public: __CLR_OR_THIS_CALL basic_ostream(const basic_ostream&) = delete; basic_ostream& __CLR_OR_THIS_CALL operator=(const basic_ostream&) = delete; - virtual __CLR_OR_THIS_CALL ~basic_ostream() noexcept {} + __CLR_OR_THIS_CALL ~basic_ostream() noexcept override {} using int_type = typename _Traits::int_type; using pos_type = typename _Traits::pos_type; diff --git a/stl/inc/sstream b/stl/inc/sstream index e18be8fe5..a53797d78 100644 --- a/stl/inc/sstream +++ b/stl/inc/sstream @@ -107,7 +107,7 @@ public: basic_stringbuf(const basic_stringbuf&) = delete; basic_stringbuf& operator=(const basic_stringbuf&) = delete; - virtual ~basic_stringbuf() noexcept { + ~basic_stringbuf() noexcept override { _Tidy(); } @@ -234,7 +234,7 @@ public: #endif // _HAS_CXX20 protected: - virtual int_type overflow(int_type _Meta = _Traits::eof()) { // put an element to stream + int_type overflow(int_type _Meta = _Traits::eof()) override { // put an element to stream if (_Mystate & _Constant) { return _Traits::eof(); // array nonmutable, fail } @@ -291,7 +291,7 @@ protected: return _Meta; } - virtual int_type pbackfail(int_type _Meta = _Traits::eof()) { // put an element back to stream + int_type pbackfail(int_type _Meta = _Traits::eof()) override { // put an element back to stream const auto _Gptr = _Mysb::gptr(); if (!_Gptr || _Gptr <= _Mysb::eback() || (!_Traits::eq_int_type(_Traits::eof(), _Meta) && !_Traits::eq(_Traits::to_char_type(_Meta), _Gptr[-1]) @@ -308,7 +308,7 @@ protected: return _Traits::not_eof(_Meta); } - virtual int_type underflow() { // get an element from stream, but don't point past it + int_type underflow() override { // get an element from stream, but don't point past it const auto _Gptr = _Mysb::gptr(); if (!_Gptr) { // no character buffer, fail return _Traits::eof(); @@ -334,8 +334,8 @@ protected: return _Traits::to_int_type(*_Mysb::gptr()); } - virtual pos_type seekoff( - off_type _Off, ios_base::seekdir _Way, ios_base::openmode _Mode = ios_base::in | ios_base::out) { + pos_type seekoff( + off_type _Off, ios_base::seekdir _Way, ios_base::openmode _Mode = ios_base::in | ios_base::out) override { // change position by _Off, according to _Way, _Mode const auto _Gptr_old = _Mysb::gptr(); const auto _Pptr_old = (_Mystate & _Constant) ? nullptr : _Mysb::pptr(); @@ -396,7 +396,7 @@ protected: return pos_type(_Off); } - virtual pos_type seekpos(pos_type _Pos, ios_base::openmode _Mode = ios_base::in | ios_base::out) { + pos_type seekpos(pos_type _Pos, ios_base::openmode _Mode = ios_base::in | ios_base::out) override { // change position to _Pos, according to _Mode const auto _Off = static_cast(_Pos); const auto _Gptr_old = _Mysb::gptr(); @@ -612,7 +612,7 @@ public: basic_istringstream(const basic_istringstream&) = delete; basic_istringstream& operator=(const basic_istringstream&) = delete; - virtual ~basic_istringstream() noexcept {} + ~basic_istringstream() noexcept override {} _NODISCARD _Mysb* rdbuf() const { return const_cast<_Mysb*>(_STD addressof(_Stringbuffer)); @@ -732,7 +732,7 @@ public: basic_ostringstream(const basic_ostringstream&) = delete; basic_ostringstream& operator=(const basic_ostringstream&) = delete; - virtual ~basic_ostringstream() noexcept {} + ~basic_ostringstream() noexcept override {} _NODISCARD _Mysb* rdbuf() const { return const_cast<_Mysb*>(_STD addressof(_Stringbuffer)); @@ -858,7 +858,7 @@ public: basic_stringstream(const basic_stringstream&) = delete; basic_stringstream& operator=(const basic_stringstream&) = delete; - virtual ~basic_stringstream() noexcept {} + ~basic_stringstream() noexcept override {} _NODISCARD _Mysb* rdbuf() const { return const_cast<_Mysb*>(_STD addressof(_Stringbuffer)); diff --git a/stl/inc/stdexcept b/stl/inc/stdexcept index 844aad34d..0e4aa1129 100644 --- a/stl/inc/stdexcept +++ b/stl/inc/stdexcept @@ -29,7 +29,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -46,7 +46,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -63,7 +63,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -80,7 +80,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -97,7 +97,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -114,7 +114,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -131,7 +131,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -148,7 +148,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -165,7 +165,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS diff --git a/stl/inc/strstream b/stl/inc/strstream index d90ed93ca..2f256cb7b 100644 --- a/stl/inc/strstream +++ b/stl/inc/strstream @@ -100,7 +100,7 @@ public: } } - virtual __CLR_OR_THIS_CALL ~strstreambuf() noexcept { + __CLR_OR_THIS_CALL ~strstreambuf() noexcept override { _Tidy(); } @@ -142,7 +142,7 @@ public: } protected: - virtual int __CLR_OR_THIS_CALL overflow(int _Meta = EOF) override { // try to extend write area + int __CLR_OR_THIS_CALL overflow(int _Meta = EOF) override { // try to extend write area if (_Meta == EOF) { return 0; // nothing to write } @@ -188,7 +188,7 @@ protected: return static_cast(*_Pninc() = static_cast(_Meta)); } - virtual int __CLR_OR_THIS_CALL pbackfail(int _Meta = EOF) override { // try to putback a character + int __CLR_OR_THIS_CALL pbackfail(int _Meta = EOF) override { // try to putback a character const auto _Old_gptr = gptr(); if (_Old_gptr && eback() < _Old_gptr) { // if the input sequence has a putback position available if (_Meta == EOF) { @@ -206,7 +206,7 @@ protected: return EOF; } - virtual int __CLR_OR_THIS_CALL underflow() override { // read if read position available + int __CLR_OR_THIS_CALL underflow() override { // read if read position available const auto _Old_gptr = gptr(); if (!_Old_gptr) { return EOF; // no read buffer @@ -234,7 +234,7 @@ protected: return EOF; } - virtual streampos __CLR_OR_THIS_CALL seekoff( + streampos __CLR_OR_THIS_CALL seekoff( streamoff _Off, ios_base::seekdir _Way, ios_base::openmode _Which = ios_base::in | ios_base::out) override { // seek by specified offset if (pptr() && _Seekhigh < pptr()) { // TRANSITION, ABI: appears unused, maintained for ABI compat @@ -314,7 +314,7 @@ protected: return pos_type(_Off); } - virtual pos_type __CLR_OR_THIS_CALL seekpos( + pos_type __CLR_OR_THIS_CALL seekpos( pos_type _Sp, ios_base::openmode _Which = ios_base::in | ios_base::out) override { // seek to memorized position if (pptr() && _Seekhigh < pptr()) { // TRANSITION, ABI: appears unused, maintained for ABI compat @@ -471,7 +471,7 @@ public: } } - virtual __CLR_OR_THIS_CALL ~istrstream() noexcept {} + __CLR_OR_THIS_CALL ~istrstream() noexcept override {} _NODISCARD _Mysb* __CLR_OR_THIS_CALL rdbuf() const { return const_cast<_Mysb*>(&_Strbuffer); @@ -527,7 +527,7 @@ public: } } - virtual __CLR_OR_THIS_CALL ~ostrstream() noexcept {} + __CLR_OR_THIS_CALL ~ostrstream() noexcept override {} _NODISCARD _Mysb* __CLR_OR_THIS_CALL rdbuf() const { return const_cast<_Mysb*>(&_Strbuffer); @@ -596,7 +596,7 @@ public: } } - virtual __CLR_OR_THIS_CALL ~strstream() noexcept {} + __CLR_OR_THIS_CALL ~strstream() noexcept override {} _NODISCARD _Mysb* __CLR_OR_THIS_CALL rdbuf() const { return const_cast<_Mysb*>(&_Strbuffer); diff --git a/stl/inc/syncstream b/stl/inc/syncstream index 434a1cd7a..fa390ff09 100644 --- a/stl/inc/syncstream +++ b/stl/inc/syncstream @@ -161,7 +161,7 @@ public: } protected: - virtual int sync() override { + int sync() override { _Mybase::_Sync_recorded = true; if (_Mybase::_Emit_on_sync) { @@ -172,7 +172,7 @@ protected: return 0; } - virtual int_type overflow(int_type _Current_elem) override { + int_type overflow(int_type _Current_elem) override { if (!_Wrapped) { return _Traits::eof(); } @@ -266,7 +266,7 @@ private: _STD swap(_Get_mutex(), _Right._Get_mutex()); } - virtual bool _Do_emit() override { + bool _Do_emit() override { return emit(); } diff --git a/stl/inc/system_error b/stl/inc/system_error index a9b527db2..7dc183ddb 100644 --- a/stl/inc/system_error +++ b/stl/inc/system_error @@ -480,7 +480,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS @@ -512,11 +512,11 @@ class _Generic_error_category : public error_category { // categorize a generic public: constexpr _Generic_error_category() noexcept : error_category(_Generic_addr) {} - _NODISCARD virtual const char* name() const noexcept override { + _NODISCARD const char* name() const noexcept override { return "generic"; } - _NODISCARD virtual string message(int _Errcode) const override { + _NODISCARD string message(int _Errcode) const override { return _Syserror_map(_Errcode); } }; @@ -525,11 +525,11 @@ class _Iostream_error_category2 : public error_category { // categorize an iostr public: constexpr _Iostream_error_category2() noexcept : error_category(_Iostream_addr) {} - _NODISCARD virtual const char* name() const noexcept override { + _NODISCARD const char* name() const noexcept override { return "iostream"; } - _NODISCARD virtual string message(int _Errcode) const override { + _NODISCARD string message(int _Errcode) const override { if (_Errcode == static_cast(io_errc::stream)) { static constexpr char _Iostream_error[] = "iostream stream error"; constexpr size_t _Iostream_error_length = sizeof(_Iostream_error) - 1; // TRANSITION, DevCom-906503 @@ -544,11 +544,11 @@ class _System_error_category : public error_category { // categorize an operatin public: constexpr _System_error_category() noexcept : error_category(_System_addr) {} - _NODISCARD virtual const char* name() const noexcept override { + _NODISCARD const char* name() const noexcept override { return "system"; } - _NODISCARD virtual string message(int _Errcode) const override { + _NODISCARD string message(int _Errcode) const override { const _System_error_message _Msg(static_cast(_Errcode)); if (_Msg._Length == 0) { static constexpr char _Unknown_error[] = "unknown error"; @@ -559,7 +559,7 @@ public: } } - _NODISCARD virtual error_condition default_error_condition(int _Errval) const noexcept override { + _NODISCARD error_condition default_error_condition(int _Errval) const noexcept override { // make error_condition for error code (generic if possible) const int _Posv = _Winerror_map(_Errval); if (_Posv == 0) { diff --git a/stl/inc/typeinfo b/stl/inc/typeinfo index 45cd623b7..2da63ec14 100644 --- a/stl/inc/typeinfo +++ b/stl/inc/typeinfo @@ -34,10 +34,10 @@ class _CRTIMP2_IMPORT bad_cast : public exception { // base of all bad cast exce public: bad_cast(const char* _Message = "bad cast") noexcept : exception(_Message) {} - virtual ~bad_cast() noexcept {} + ~bad_cast() noexcept override {} protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } }; @@ -47,10 +47,10 @@ class _CRTIMP2_IMPORT bad_typeid : public exception { // base of all bad typeid public: bad_typeid(const char* _Message = "bad typeid") noexcept : exception(_Message) {} - virtual ~bad_typeid() noexcept {} + ~bad_typeid() noexcept override {} protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } }; diff --git a/stl/inc/variant b/stl/inc/variant index 3a8143300..1a812b679 100644 --- a/stl/inc/variant +++ b/stl/inc/variant @@ -425,13 +425,13 @@ class bad_variant_access public: bad_variant_access() noexcept = default; - _NODISCARD virtual const char* __CLR_OR_THIS_CALL what() const noexcept override { + _NODISCARD const char* __CLR_OR_THIS_CALL what() const noexcept override { return "bad variant access"; } #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // perform class-specific exception handling + void _Doraise() const override { // perform class-specific exception handling _RAISE(*this); } #endif // !_HAS_EXCEPTIONS diff --git a/stl/inc/xiosbase b/stl/inc/xiosbase index bf5bf3a07..64418d8c8 100644 --- a/stl/inc/xiosbase +++ b/stl/inc/xiosbase @@ -206,7 +206,7 @@ public: #if !_HAS_EXCEPTIONS protected: - virtual void _Doraise() const override { // report the exception + void _Doraise() const override { // report the exception _RAISE(*this); } #endif // !_HAS_EXCEPTIONS diff --git a/stl/inc/xlocale b/stl/inc/xlocale index 7a20b8d3f..03e825712 100644 --- a/stl/inc/xlocale +++ b/stl/inc/xlocale @@ -132,11 +132,11 @@ public: return static_cast(-1); } - virtual void __CLR_OR_THIS_CALL _Incref() noexcept override { // increment use count + void __CLR_OR_THIS_CALL _Incref() noexcept override { // increment use count _MT_INCR(_Myrefs); } - virtual _Facet_base* __CLR_OR_THIS_CALL _Decref() noexcept override { // decrement use count + _Facet_base* __CLR_OR_THIS_CALL _Decref() noexcept override { // decrement use count if (_MT_DECR(_Myrefs) == 0) { return this; } @@ -152,7 +152,7 @@ public: : _Myrefs(static_cast<_Atomic_counter_t>(_Initrefs)) // non-atomic initialization {} - virtual __CLR_OR_THIS_CALL ~facet() noexcept override {} + __CLR_OR_THIS_CALL ~facet() noexcept override {} public: __CLR_OR_THIS_CALL facet(const facet&) = delete; @@ -721,11 +721,11 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~codecvt() noexcept {} + __CLR_OR_THIS_CALL ~codecvt() noexcept override {} void __CLR_OR_THIS_CALL _Init(const _Locinfo&) {} // initialize from _Locinfo object - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input (from codecvt) return is_same_v<_Byte, _Elem>; } @@ -908,7 +908,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~codecvt() noexcept {} + __CLR_OR_THIS_CALL ~codecvt() noexcept override {} void __CLR_OR_THIS_CALL _Init(const _Locinfo&) {} // initialize @@ -1114,12 +1114,12 @@ protected: return _Codecvt_do_length(*this, _State, _First1, _Last1, _Count); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion if ((_Mode & _Consume_header) != 0) { @@ -1133,7 +1133,7 @@ protected: return 6; // 6-byte max input sequence, no 3-byte header } - virtual int do_encoding() const noexcept override { + int do_encoding() const noexcept override { return 0; // 0 => varying length } @@ -1207,7 +1207,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~codecvt() noexcept {} + __CLR_OR_THIS_CALL ~codecvt() noexcept override {} void __CLR_OR_THIS_CALL _Init(const _Locinfo&) {} // initialize @@ -1356,17 +1356,17 @@ protected: return _Codecvt_do_length(*this, _State, _First1, _Last1, _Count); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion return (_Mode & (_Consume_header | _Generate_header)) != 0 ? 9 : 6; } - virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override { + int __CLR_OR_THIS_CALL do_encoding() const noexcept override { // return length of code sequence (from codecvt) return (_Mode & (_Consume_header | _Generate_header)) != 0 ? -1 : 0; // -1 => state dependent, 0 => varying length @@ -1444,7 +1444,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~codecvt() noexcept override = default; + __CLR_OR_THIS_CALL ~codecvt() noexcept override = default; virtual result __CLR_OR_THIS_CALL do_in(mbstate_t&, const char8_t* _First1, const char8_t* _Last1, const char8_t*& _Mid1, char16_t* _First2, char16_t* _Last2, char16_t*& _Mid2) const { @@ -1663,17 +1663,17 @@ protected: return static_cast((_STD min) (_First1 - _Old_first1, ptrdiff_t{INT_MAX})); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion return 4; // 4-byte max input sequence } - virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override { + int __CLR_OR_THIS_CALL do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // 0 => varying length } @@ -1726,7 +1726,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~codecvt() noexcept override = default; + __CLR_OR_THIS_CALL ~codecvt() noexcept override = default; virtual result __CLR_OR_THIS_CALL do_in(mbstate_t&, const char8_t* _First1, const char8_t* _Last1, const char8_t*& _Mid1, char32_t* _First2, char32_t* _Last2, char32_t*& _Mid2) const { @@ -1906,17 +1906,17 @@ protected: return static_cast((_STD min) (_First1 - _Old_first1, ptrdiff_t{INT_MAX})); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion return 4; } - virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override { + int __CLR_OR_THIS_CALL do_encoding() const noexcept override { // return length of code sequence (from codecvt) return 0; // varying length } @@ -1977,7 +1977,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~codecvt() noexcept {} + __CLR_OR_THIS_CALL ~codecvt() noexcept override {} void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj) { // initialize from _Lobj _Cvt = _Lobj._Getcvt(); @@ -2103,17 +2103,17 @@ protected: return static_cast((_STD min) (_First1 - _Old_first1, ptrdiff_t{INT_MAX})); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion (from codecvt) return static_cast(_Cvt._Mbcurmax); } - virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override { + int __CLR_OR_THIS_CALL do_encoding() const noexcept override { // return length of code sequence (from codecvt) return _Cvt._Mbcurmax == 1; // 0 => varying length, 1 => fixed length } @@ -2177,7 +2177,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~codecvt() noexcept {} + __CLR_OR_THIS_CALL ~codecvt() noexcept override {} void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj) { // initialize from _Lobj _Cvt = _Lobj._Getcvt(); @@ -2305,17 +2305,17 @@ protected: return static_cast((_STD min) (_First1 - _Old_first1, ptrdiff_t{INT_MAX})); } - virtual bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { + bool __CLR_OR_THIS_CALL do_always_noconv() const noexcept override { // return true if conversions never change input return false; } - virtual int __CLR_OR_THIS_CALL do_max_length() const noexcept override { + int __CLR_OR_THIS_CALL do_max_length() const noexcept override { // return maximum length required for a conversion (from codecvt) return static_cast(_Cvt._Mbcurmax); } - virtual int __CLR_OR_THIS_CALL do_encoding() const noexcept override { + int __CLR_OR_THIS_CALL do_encoding() const noexcept override { // return length of code sequence (from codecvt) return _Cvt._Mbcurmax == 1u; // 0 => varying length, 1 => fixed length } @@ -2344,7 +2344,7 @@ public: : codecvt<_Elem, _Byte, _Statype>(_Locinfo(_Str.c_str()), _Refs) {} // construct for named locale protected: - virtual __CLR_OR_THIS_CALL ~codecvt_byname() noexcept {} + __CLR_OR_THIS_CALL ~codecvt_byname() noexcept override {} }; // CTYPE CODE BITS @@ -2378,7 +2378,7 @@ struct _CRTIMP2_PURE_IMPORT ctype_base : locale::facet { // base for ctype __CLR_OR_THIS_CALL ctype_base(size_t _Refs = 0) : locale::facet(_Refs) {} - __CLR_OR_THIS_CALL ~ctype_base() noexcept {} + __CLR_OR_THIS_CALL ~ctype_base() noexcept override {} }; #undef _XA @@ -2476,7 +2476,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~ctype() noexcept { + __CLR_OR_THIS_CALL ~ctype() noexcept override { if (_Ctype._Delfl) { _CSTD free(const_cast(_Ctype._Table)); } @@ -2745,7 +2745,7 @@ public: _PGLOBAL static const size_t table_size = 1 << CHAR_BIT; // size of ctype mapping table, typically 256 protected: - virtual __CLR_OR_THIS_CALL ~ctype() noexcept { + __CLR_OR_THIS_CALL ~ctype() noexcept override { _Tidy(); } @@ -2901,7 +2901,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~ctype() noexcept { + __CLR_OR_THIS_CALL ~ctype() noexcept override { if (_Ctype._Delfl) { _CSTD free(const_cast(_Ctype._Table)); } @@ -3103,7 +3103,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~ctype() noexcept { + __CLR_OR_THIS_CALL ~ctype() noexcept override { if (_Ctype._Delfl) { _CSTD free(const_cast(_Ctype._Table)); } @@ -3240,7 +3240,7 @@ public: : ctype<_Elem>(_Locinfo(_Str.c_str()), _Refs) {} // construct for named locale protected: - virtual __CLR_OR_THIS_CALL ~ctype_byname() noexcept {} + __CLR_OR_THIS_CALL ~ctype_byname() noexcept override {} }; // FUNCTION TEMPLATE _Getloctxt diff --git a/stl/inc/xlocbuf b/stl/inc/xlocbuf index d9e3c05ee..acf9cb85b 100644 --- a/stl/inc/xlocbuf +++ b/stl/inc/xlocbuf @@ -58,7 +58,7 @@ public: _Loc = locale(_Loc, _Pcvt); } - virtual ~wbuffer_convert() noexcept { + ~wbuffer_convert() noexcept override { while (_Status == _Wrote) { // put any trailing homing shift if (_Str.size() < _STRING_INC) { _Str.assign(_STRING_INC, '\0'); @@ -113,7 +113,7 @@ public: wbuffer_convert& operator=(const wbuffer_convert&) = delete; protected: - virtual int_type overflow(int_type _Meta = _Traits::eof()) { // put an element to stream + int_type overflow(int_type _Meta = _Traits::eof()) override { // put an element to stream if (_Traits::eq_int_type(_Traits::eof(), _Meta)) { return _Traits::not_eof(_Meta); // EOF, return success code } else if (!_Mystrbuf || 0 < _Nback || (_Status != _Unused && _Status != _Wrote)) { @@ -172,7 +172,7 @@ protected: } } - virtual int_type pbackfail(int_type _Meta = _Traits::eof()) { // put an element back to stream + int_type pbackfail(int_type _Meta = _Traits::eof()) override { // put an element back to stream if (sizeof(_Myback) / sizeof(_Myback[0]) <= _Nback || _Status == _Wrote) { return _Traits::eof(); // nowhere to put back } else { // enough room, put it back @@ -189,7 +189,7 @@ protected: } } - virtual int_type underflow() { // get an element from stream, but don't point past it + int_type underflow() override { // get an element from stream, but don't point past it int_type _Meta; if (0 >= _Nback) { @@ -206,7 +206,7 @@ protected: #pragma warning(push) #pragma warning(disable : 6385) // Reading invalid data from 'this->_Myback': // the readable size is 'X' bytes, but 'Y' bytes may be read. - virtual int_type uflow() { // get an element from stream, point past it + int_type uflow() override { // get an element from stream, point past it int_type _Meta; if (0 >= _Nback) { @@ -221,13 +221,15 @@ protected: } #pragma warning(pop) - virtual pos_type seekoff(off_type, ios_base::seekdir, - ios_base::openmode = static_cast(ios_base::in | ios_base::out)) { // change position by _Off + pos_type seekoff(off_type, ios_base::seekdir, + ios_base::openmode = static_cast( + ios_base::in | ios_base::out)) override { // change position by _Off return pos_type(-1); // always fail } - virtual pos_type seekpos(pos_type, - ios_base::openmode = static_cast(ios_base::in | ios_base::out)) { // change position to _Pos + pos_type seekpos(pos_type, + ios_base::openmode = static_cast( + ios_base::in | ios_base::out)) override { // change position to _Pos return pos_type(-1); // always fail } diff --git a/stl/inc/xlocmes b/stl/inc/xlocmes index ef4347ffe..56fad5cff 100644 --- a/stl/inc/xlocmes +++ b/stl/inc/xlocmes @@ -76,7 +76,7 @@ protected: _END_LOCINFO() } - virtual __CLR_OR_THIS_CALL ~messages() noexcept {} + __CLR_OR_THIS_CALL ~messages() noexcept override {} void _Init(const _Locinfo&) {} // initialize from _Locinfo object (do nothing) @@ -118,7 +118,7 @@ public: : messages<_Elem>(_Str.c_str(), _Refs) {} // construct for named locale protected: - virtual __CLR_OR_THIS_CALL ~messages_byname() noexcept {} + __CLR_OR_THIS_CALL ~messages_byname() noexcept override {} }; #if defined(_DLL_CPPLIB) diff --git a/stl/inc/xlocmon b/stl/inc/xlocmon index 5a48a3110..895c2cce1 100644 --- a/stl/inc/xlocmon +++ b/stl/inc/xlocmon @@ -103,7 +103,7 @@ protected: _END_LOCINFO() } - virtual __CLR_OR_THIS_CALL ~_Mpunct() noexcept { + __CLR_OR_THIS_CALL ~_Mpunct() noexcept override { _Tidy(); } @@ -271,7 +271,7 @@ public: protected: moneypunct(const char* _Locname, size_t _Refs = 0) : _Mpunct<_Elem>(_Locname, _Refs, _Intl) {} - virtual __CLR_OR_THIS_CALL ~moneypunct() noexcept {} + __CLR_OR_THIS_CALL ~moneypunct() noexcept override {} }; #ifdef __clang__ @@ -304,7 +304,7 @@ public: : moneypunct<_Elem, _Intl>(_Str.c_str(), _Refs) {} // construct for named locale protected: - virtual __CLR_OR_THIS_CALL ~moneypunct_byname() noexcept {} + __CLR_OR_THIS_CALL ~moneypunct_byname() noexcept override {} }; // CLASS TEMPLATE money_get @@ -353,7 +353,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~money_get() noexcept {} + __CLR_OR_THIS_CALL ~money_get() noexcept override {} void _Init(const _Locinfo&) {} // initialize from _Locinfo object @@ -659,7 +659,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~money_put() noexcept {} + __CLR_OR_THIS_CALL ~money_put() noexcept override {} void _Init(const _Locinfo&) {} // initialize from _Locinfo object diff --git a/stl/inc/xlocnum b/stl/inc/xlocnum index 9b1c2b0bd..b7d4a2b24 100644 --- a/stl/inc/xlocnum +++ b/stl/inc/xlocnum @@ -158,7 +158,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~numpunct() noexcept { + __CLR_OR_THIS_CALL ~numpunct() noexcept override { _Tidy(); } @@ -249,7 +249,7 @@ public: : numpunct<_Elem>(_Str.c_str(), _Refs) {} // construct for named locale protected: - virtual __CLR_OR_THIS_CALL ~numpunct_byname() noexcept {} + __CLR_OR_THIS_CALL ~numpunct_byname() noexcept override {} }; // STATIC numpunct::id OBJECT @@ -286,7 +286,7 @@ public: __PURE_APPDOMAIN_GLOBAL static locale::id id; // unique facet id protected: - virtual __CLR_OR_THIS_CALL ~num_get() noexcept {} + __CLR_OR_THIS_CALL ~num_get() noexcept override {} void _Init(const _Locinfo&) {} // initialize from _Locinfo object @@ -1204,7 +1204,7 @@ public: __PURE_APPDOMAIN_GLOBAL static locale::id id; // unique facet id protected: - virtual __CLR_OR_THIS_CALL ~num_put() noexcept {} + __CLR_OR_THIS_CALL ~num_put() noexcept override {} void __CLR_OR_THIS_CALL _Init(const _Locinfo&) {} // initialize from _Locinfo object diff --git a/stl/inc/xloctime b/stl/inc/xloctime index 7fd8d7be6..91283d6f0 100644 --- a/stl/inc/xloctime +++ b/stl/inc/xloctime @@ -32,7 +32,7 @@ struct _CRTIMP2_PURE_IMPORT time_base : locale::facet { // base class for time_g __CLR_OR_THIS_CALL time_base(size_t _Refs = 0) : locale::facet(_Refs) {} - __CLR_OR_THIS_CALL ~time_base() noexcept {} + __CLR_OR_THIS_CALL ~time_base() noexcept override {} }; // CLASS TEMPLATE time_get @@ -159,7 +159,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~time_get() noexcept { + __CLR_OR_THIS_CALL ~time_get() noexcept override { _Tidy(); } @@ -634,7 +634,7 @@ public: : time_get<_Elem, _InIt>(_Locinfo(_Str.c_str()), _Refs) {} // construct for named locale protected: - virtual __CLR_OR_THIS_CALL ~time_get_byname() noexcept {} + __CLR_OR_THIS_CALL ~time_get_byname() noexcept override {} }; // CLASS TEMPLATE time_put @@ -709,7 +709,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~time_put() noexcept {} + __CLR_OR_THIS_CALL ~time_put() noexcept override {} void __CLR_OR_THIS_CALL _Init(const _Locinfo& _Lobj) { // initialize from _Lobj _Tnames = _Lobj._Gettnames(); @@ -834,7 +834,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~time_put() noexcept {} + __CLR_OR_THIS_CALL ~time_put() noexcept override {} __CLR_OR_THIS_CALL time_put(const char* _Locname, size_t _Refs = 0) : locale::facet(_Refs) { _BEGIN_LOCINFO(_Lobj(_Locname)) @@ -965,7 +965,7 @@ public: } protected: - virtual __CLR_OR_THIS_CALL ~time_put() noexcept {} + __CLR_OR_THIS_CALL ~time_put() noexcept override {} __CLR_OR_THIS_CALL time_put(const char* _Locname, size_t _Refs = 0) : locale::facet(_Refs) { _BEGIN_LOCINFO(_Lobj(_Locname)) @@ -1038,7 +1038,7 @@ public: : time_put<_Elem, _OutIt>(_Str.c_str(), _Refs) {} // construct for named locale protected: - virtual __CLR_OR_THIS_CALL ~time_put_byname() noexcept {} + __CLR_OR_THIS_CALL ~time_put_byname() noexcept override {} }; #if defined(_DLL_CPPLIB) diff --git a/stl/src/excptptr.cpp b/stl/src/excptptr.cpp index c1716681e..d10ccbb63 100644 --- a/stl/src/excptptr.cpp +++ b/stl/src/excptptr.cpp @@ -214,11 +214,11 @@ namespace { // reference count control block for special "never allocates" exceptions like the bad_alloc or bad_exception // exception_ptrs private: - virtual void _Destroy() noexcept override { + void _Destroy() noexcept override { // intentionally does nothing } - virtual void _Delete_this() noexcept override { + void _Delete_this() noexcept override { // intentionally does nothing } @@ -244,7 +244,7 @@ namespace { // reference count control block for exception_ptrs; the exception object is stored at // reinterpret_cast(this) + sizeof(_ExceptionPtr_normal) private: - virtual void _Destroy() noexcept override { + void _Destroy() noexcept override { // call the destructor for a stored pure or native C++ exception if necessary const auto& _CppEhRecord = reinterpret_cast(_ExRecord); @@ -290,7 +290,7 @@ namespace { } } - virtual void _Delete_this() noexcept override { + void _Delete_this() noexcept override { free(this); } diff --git a/stl/src/memory_resource.cpp b/stl/src/memory_resource.cpp index 911ca06a2..e932bc0d6 100644 --- a/stl/src/memory_resource.cpp +++ b/stl/src/memory_resource.cpp @@ -61,10 +61,10 @@ namespace pmr { // 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! + void* do_allocate(size_t, size_t) override { // Sorry, OOM! _Xbad_alloc(); } - virtual void do_deallocate(void*, size_t, size_t) override {} // Nothing to do + void do_deallocate(void*, size_t, size_t) override {} // Nothing to do }; return &const_cast<_Null_resource&>(_Immortalize_memcpy_image<_Null_resource>()); diff --git a/stl/src/primitives.hpp b/stl/src/primitives.hpp index 7f94616c0..f5e37f505 100644 --- a/stl/src/primitives.hpp +++ b/stl/src/primitives.hpp @@ -43,24 +43,24 @@ namespace Concurrency { stl_critical_section_vista& operator=(const stl_critical_section_vista&) = delete; ~stl_critical_section_vista() = delete; - virtual void destroy() override { + void destroy() override { DeleteCriticalSection(&_M_critical_section); } - virtual void lock() override { + void lock() override { EnterCriticalSection(&_M_critical_section); } - virtual bool try_lock() override { + bool try_lock() override { return TryEnterCriticalSection(&_M_critical_section) != 0; } - virtual bool try_lock_for(unsigned int) override { + bool try_lock_for(unsigned int) override { // STL will call try_lock_for once again if this call will not succeed return stl_critical_section_vista::try_lock(); } - virtual void unlock() override { + void unlock() override { LeaveCriticalSection(&_M_critical_section); } @@ -82,25 +82,25 @@ namespace Concurrency { stl_condition_variable_vista(const stl_condition_variable_vista&) = delete; stl_condition_variable_vista& operator=(const stl_condition_variable_vista&) = delete; - virtual void destroy() override {} + void destroy() override {} - virtual void wait(stl_critical_section_interface* lock) override { + void wait(stl_critical_section_interface* lock) override { if (!stl_condition_variable_vista::wait_for(lock, INFINITE)) { std::terminate(); } } - virtual bool wait_for(stl_critical_section_interface* lock, unsigned int timeout) override { + bool wait_for(stl_critical_section_interface* lock, unsigned int timeout) override { return SleepConditionVariableCS(&m_condition_variable, static_cast(lock)->native_handle(), timeout) != 0; } - virtual void notify_one() override { + void notify_one() override { WakeConditionVariable(&m_condition_variable); } - virtual void notify_all() override { + void notify_all() override { WakeAllConditionVariable(&m_condition_variable); } @@ -118,22 +118,22 @@ namespace Concurrency { stl_critical_section_win7(const stl_critical_section_win7&) = delete; stl_critical_section_win7& operator=(const stl_critical_section_win7&) = delete; - virtual void destroy() override {} + void destroy() override {} - virtual void lock() override { + void lock() override { AcquireSRWLockExclusive(&m_srw_lock); } - virtual bool try_lock() override { + bool try_lock() override { return __crtTryAcquireSRWLockExclusive(&m_srw_lock) != 0; } - virtual bool try_lock_for(unsigned int) override { + bool try_lock_for(unsigned int) override { // STL will call try_lock_for once again if this call will not succeed return stl_critical_section_win7::try_lock(); } - virtual void unlock() override { + void unlock() override { ReleaseSRWLockExclusive(&m_srw_lock); } @@ -155,25 +155,25 @@ namespace Concurrency { stl_condition_variable_win7(const stl_condition_variable_win7&) = delete; stl_condition_variable_win7& operator=(const stl_condition_variable_win7&) = delete; - virtual void destroy() override {} + void destroy() override {} - virtual void wait(stl_critical_section_interface* lock) override { + void wait(stl_critical_section_interface* lock) override { if (!stl_condition_variable_win7::wait_for(lock, INFINITE)) { std::terminate(); } } - virtual bool wait_for(stl_critical_section_interface* lock, unsigned int timeout) override { + bool wait_for(stl_critical_section_interface* lock, unsigned int timeout) override { return SleepConditionVariableSRW(&m_condition_variable, static_cast(lock)->native_handle(), timeout, 0) != 0; } - virtual void notify_one() override { + void notify_one() override { WakeConditionVariable(&m_condition_variable); } - virtual void notify_all() override { + void notify_all() override { WakeAllConditionVariable(&m_condition_variable); }