diff --git a/stl/inc/exception b/stl/inc/exception index e9e9ef10a39..fc888003c12 100644 --- a/stl/inc/exception +++ b/stl/inc/exception @@ -361,8 +361,7 @@ _EXPORT_STD template if constexpr (is_class_v<_Uty> && !is_base_of_v && !is_final_v<_Uty>) { // throw user exception glued to nested_exception - using _Glued = _With_nested_v2<_Uty>; - _THROW(_Glued(_STD forward<_Ty>(_Arg))); + _THROW(_With_nested_v2<_Uty>(_STD forward<_Ty>(_Arg))); } else { // throw user exception by itself _THROW(_STD forward<_Ty>(_Arg)); diff --git a/stl/inc/ios b/stl/inc/ios index 86b54450d14..881c292ba29 100644 --- a/stl/inc/ios +++ b/stl/inc/ios @@ -37,7 +37,7 @@ public: void __CLR_OR_THIS_CALL clear(iostate _State = goodbit, bool _Reraise = false) { // set state, possibly reraise exception - ios_base::clear(_State | (_Mystrbuf ? ios_base::_Iostate{} : ios_base::badbit), _Reraise); + ios_base::clear(_State | (_Mystrbuf ? ios_base::goodbit : ios_base::badbit), _Reraise); } #if _HAS_OLD_IOSTREAMS_MEMBERS diff --git a/stl/inc/random b/stl/inc/random index 377d5cb8095..e06dd6a168e 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -1542,11 +1542,11 @@ public: template = 0> explicit discard_block_engine(_Seed_seq& _Seq) : _Mybase(_Seq) {} - _NODISCARD static constexpr typename _Engine::result_type(min)() noexcept /* strengthened */ { + _NODISCARD static constexpr result_type(min)() noexcept /* strengthened */ { return (_Engine::min)(); } - _NODISCARD static constexpr typename _Engine::result_type(max)() noexcept /* strengthened */ { + _NODISCARD static constexpr result_type(max)() noexcept /* strengthened */ { return (_Engine::max)(); } }; diff --git a/stl/inc/xstring b/stl/inc/xstring index ce879cf28ad..a5aa4f4f40c 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -4856,7 +4856,8 @@ private: _CONSTEXPR20 void _Eos(const size_type _New_size) noexcept { // set new length and null terminator _ASAN_STRING_MODIFY(*this, _Mypair._Myval2._Mysize, _New_size); - _Traits::assign(_Mypair._Myval2._Myptr()[_Mypair._Myval2._Mysize = _New_size], _Elem()); + _Mypair._Myval2._Mysize = _New_size; + _Traits::assign(_Mypair._Myval2._Myptr()[_New_size], _Elem()); } _CONSTEXPR20 void _Tidy_deallocate() noexcept { // initialize buffer, deallocating any storage diff --git a/stl/inc/xutility b/stl/inc/xutility index aa972c04e5a..4bf5405eda8 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -4562,16 +4562,13 @@ _CONSTEXPR20 _OutIt _Copy_unchecked(_InIt _First, _Sent _Last, _OutIt _Dest) { #endif // _HAS_CXX20 { #ifdef __cpp_lib_concepts - if constexpr (is_same_v<_InIt, _Sent>) + if constexpr (!is_same_v<_InIt, _Sent>) { + return _Copy_memmove_n(_First, static_cast(_Last - _First), _Dest); + } else #endif // defined(__cpp_lib_concepts) { return _Copy_memmove(_First, _Last, _Dest); } -#ifdef __cpp_lib_concepts - else { - return _Copy_memmove_n(_First, static_cast(_Last - _First), _Dest); - } -#endif // defined(__cpp_lib_concepts) } }