https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Status|WAITING |ASSIGNED --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jamaika from comment #0) > c:\gcc1300\include\c++\13.0.0\format:3350:40: error: expected identifier > before ',' token > 3350 | __format::__do_vformat_to(_Out_, basic_string_view<_CharT_>, > | ^ This looks like you've got _Out_ defined as a macro, which causes an error in this friend declaration. Then because the function isn't a friend, you get access errors in the function that's supposed to be a friend: > c:\gcc1300\include\c++\13.0.0\format: In instantiation of '_Out > std::__format::__do_vformat_to(_Out, std::basic_string_view<_CharT>, const > std::basic_format_args<_Context>&, const std::locale*) [with _Out = > _Sink_iter<char>; _CharT = char; _Context = > std::basic_format_context<_Sink_iter<char>, char>]': > c:\gcc1300\include\c++\13.0.0\format:3646:39: required from '_Out > std::vformat_to(_Out, string_view, format_args) [with _Out = > __format::_Sink_iter<char>; string_view = basic_string_view<char>; > format_args = > basic_format_args<basic_format_context<__format::_Sink_iter<char>, char> >]' > c:\gcc1300\include\c++\13.0.0\format:3673:20: required from here > c:\gcc1300\include\c++\13.0.0\format:3614:24: error: > 'std::basic_format_context<_Out, > _CharT>::basic_format_context(std::basic_format_args<std:: > basic_format_context<_Out, _CharT> >, _Out) [with _Out = > std::__format::_Sink_iter<char>; _CharT = char]' is private within this > context > 3614 | ? _Context(__args, __sink_out) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > c:\gcc1300\include\c++\13.0.0\format:3338:7: note: declared private here > 3338 | basic_format_context(basic_format_args<basic_format_context> > __args, > | ^~~~~~~~~~~~~~~~~~~~ And I think that's because _Out_ is a Windows SAL macro: mingw-w64-tools/widl/include/sal.h:#define _Out_ So confirmed as a bug but next time please provide a proper bug report.