[Development] std::format support for Qt string types

Thiago Macieira thiago.macieira at intel.com
Fri Jun 7 18:25:28 CEST 2024


On Friday 7 June 2024 08:40:33 GMT-7 Ivan Solovev via Development wrote:
> IIUC, the problem of extra allocations is covered by the transcoding
> iterators and views in the paper that was linked by Giuseppe.

Yes and no.

That appears to transfer the responsibility of transcoding to the formatter, 
which may be acceptable for std::format() on std::string or for std::print(), 
because for those, performance and code bloat are entirely unimportant.

The question I want to see addressed is performance when we begin using format 
to replace QString::arg() and thus tr(). We have highly-specialised conversion 
code because this is critical to us and I'd like to see it used. So how do we 
ensure that in those contexts we use our code, which is not and cannot be 
inline?

How do we format onto a QString?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel DCAI Fleet Engineering and Quality
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240607/209a94d8/attachment.bin>


More information about the Development mailing list