C++ Logo

sg16

Advanced search

Re: [isocpp-lib-ext] Formatters converting sequences of char to sequences of wchar_t

From: Mark de Wever <koraq_at_[hidden]>
Date: Thu, 1 Jun 2023 20:52:40 +0200
On Thu, Jun 01, 2023 at 12:20:59PM -0400, Tom Honermann via Lib-Ext wrote:
> On 5/31/23 1:29 PM, Victor Zverovich via Lib-Ext wrote:
> > Thanks for catching this, it looks like a serious problem.
> >
> > - Do we want to allow string types of chars to be formatted as
> > sequences of wchar_ts?
> >
> > Definitely not. In general this requires transcoding and goes against
> > the design of std::format.
> >
> > - Do we want to allow non string type sequences of chars to be
> > formatted as sequences of wchar_ts?
> >
> > Similarly no.
> >
> > - Should we disable char to wchar_t conversion in the range_formatter?
> >
> > Probably yes but I haven't looked in detail yet.
> My intuition matches Victor's for all three questions.
> >
> > Please open an LWG issue and we'll need to discuss it in SG16.
>
> Please copy me on the LWG issue request and I'll schedule it for discussion
> in SG16 once it has been created.

Victor, Tom, thanks for the input. I just filed an LWG issue.

Cheers,
Mark

Received on 2023-06-01 18:52:45