зеркало из https://github.com/microsoft/STL.git
format (and friends) should reject volatile arguments (#2579)
This commit is contained in:
Родитель
06514fc205
Коммит
4bb41db3d8
|
@ -1493,10 +1493,10 @@ struct _Format_arg_traits {
|
|||
// clang-format on
|
||||
|
||||
template <class _Ty>
|
||||
using _Storage_type = decltype(_Phony_basic_format_arg_constructor(_STD declval<_Ty>()));
|
||||
using _Storage_type = decltype(_Phony_basic_format_arg_constructor(_STD declval<_Ty&>()));
|
||||
|
||||
template <class _Ty>
|
||||
static constexpr size_t _Storage_size = sizeof(_Storage_type<remove_cvref_t<_Ty>>);
|
||||
static constexpr size_t _Storage_size = sizeof(_Storage_type<_Ty>);
|
||||
};
|
||||
|
||||
struct _Format_arg_index {
|
||||
|
@ -1558,7 +1558,7 @@ private:
|
|||
|
||||
template <class _Ty>
|
||||
void _Store(const size_t _Arg_index, _Ty&& _Val) noexcept {
|
||||
using _Erased_type = typename _Traits::template _Storage_type<remove_cvref_t<_Ty>>;
|
||||
using _Erased_type = typename _Traits::template _Storage_type<_Ty>;
|
||||
|
||||
_Basic_format_arg_type _Arg_type;
|
||||
if constexpr (is_same_v<_Erased_type, bool>) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче