]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix mingw build by using _M_span [PR119970]
authorTomasz Kamiński <tkaminsk@redhat.com>
Mon, 28 Apr 2025 06:53:59 +0000 (08:53 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Mon, 28 Apr 2025 09:03:50 +0000 (11:03 +0200)
The r16-142-g01e5ef3e8b9128 chagned return type of _Str_sink::view()
to basic_string_view<_CharT>. The mutable access is provided by _M_span
function, that is now used for mingw path.

PR libstdc++/119970

libstdc++-v3/ChangeLog:

* include/std/ostream (vprint_unicode) [_WIN32 && !__CYGWIN__]: Call
_Str_sink::_M_span instead of view.
* include/std/print (vprint_unicode) [_WIN32 && !__CYGWIN__]: Call
_Str_sink::_M_span instead of view.

libstdc++-v3/include/std/ostream
libstdc++-v3/include/std/print

index 644e568e88296ca8afa0216c5a9116101c22da56..3a0a0d35df1d69f620bfbe0e1d94a790904193f2 100644 (file)
@@ -193,7 +193,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       {
        __format::_Str_sink<char> __buf;
        std::vformat_to(__buf.out(), __os.getloc(), __fmt, __args);
-       auto __out = __buf.view();
+       auto __out = __buf._M_span();
 
        void* __open_terminal(streambuf*);
        error_code __write_to_terminal(void*, span<char>);
index ea1aaac438929839b41432c3eaac75a01a4ae7b4..92dbe118fc310416fcd85459f2f6b184ae18c309 100644 (file)
@@ -73,7 +73,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #else
     __format::_Str_sink<char> __buf;
     std::vformat_to(__buf.out(), __fmt, __args);
-    auto __out = __buf.view();
+    auto __out = __buf._M_span();
 
     void* __open_terminal(FILE*);
     error_code __write_to_terminal(void*, span<char>);