From 401724324f8eb136a29872fa22d87ab51a5c200e Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 7 Dec 2023 08:36:47 -0800 Subject: [PATCH] ``: Avoid truncation warnings in `basic_stringbuf`'s constructor (#4228) --- stl/inc/sstream | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/sstream b/stl/inc/sstream index c78711c54a..59f0e6b6c0 100644 --- a/stl/inc/sstream +++ b/stl/inc/sstream @@ -54,7 +54,7 @@ public: template basic_stringbuf(const basic_string<_Elem, _Traits, _Alloc2>& _Str, ios_base::openmode _Mode, const _Alloc& _Al_) : _Al(_Al_) { - _Init(_Str.c_str(), _Str.size(), _Getstate(_Mode)); + _Init(_Str.c_str(), _Convert_size<_Mysize_type>(_Str.size()), _Getstate(_Mode)); } template