On Friday 7 June 2024 01:53:55 GMT-7 Ivan Solovev via Development wrote:
> Note that currently the standard does not allow to mix char and wide char
> strings, so something like this will not work:
> 
>  std::wstring wstr = ~~~;
>  std::format("{}", wstr); // ERROR!
> 
> That would mean the following:
> * std::formatter<QString(View), wchar_t>, which will simply call
>  QString::toStdWString() and format the resulting std::wstring.

In addition to what Peppe and Eddy said, I recommend we completely ignore 
wchar_t. It's not useful to us because it's only useful in one platform.

It might be that SG16 hasn't tackled formatting onto char16_t and char32_t and 
formatting of std::u16string and std::u32string and similar *because* they 
have yet to come up with functions to do transcoding. But we won't know unless 
we ask.

Or we'll find out that "it's what fmtlib did, so no one has looked into that".

We have and we need it. We also would like to have the ability to allocate 
buffer in the output, write to it, and only then let the output know how much 
we've written. I could not find a way to do that with std::formatter.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel DCAI Fleet Engineering and Quality

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-- 
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to