From 1be88e43f3e93e85bef9499de905fa72d8596e7d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomasz=20Kami=C5=84ski?= Date: Mon, 28 Apr 2025 08:53:59 +0200 Subject: [PATCH] libstdc++: Fix mingw build by using _M_span [PR119970] 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 | 2 +- libstdc++-v3/include/std/print | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream index 644e568e8829..3a0a0d35df1d 100644 --- a/libstdc++-v3/include/std/ostream +++ b/libstdc++-v3/include/std/ostream @@ -193,7 +193,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { __format::_Str_sink __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); diff --git a/libstdc++-v3/include/std/print b/libstdc++-v3/include/std/print index ea1aaac43892..92dbe118fc31 100644 --- a/libstdc++-v3/include/std/print +++ b/libstdc++-v3/include/std/print @@ -73,7 +73,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #else __format::_Str_sink __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); -- 2.47.2