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

2024-06-24 Thread Ivan Solovev via Development
___ From: Development on behalf of Thiago Macieira Sent: Wednesday, June 19, 2024 5:22 PM To: development@qt-project.org Subject: Re: [Development] std::format support for Qt string types On Wednesday 19 June 2024 04:32:42 GMT-7 Giuseppe D'Angelo via Development wrote: > I wouldn't say "

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

2024-06-19 Thread Thiago Macieira
On Wednesday 19 June 2024 04:32:42 GMT-7 Giuseppe D'Angelo via Development wrote: > I wouldn't say "force", but we could certainly check for it. We depend > on that: we assume that string literals in our headers are UTF-8 encoded. > > I it worth it though? Since we're talking about user code,

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

2024-06-19 Thread Giuseppe D'Angelo via Development
Hi, On 19/06/2024 11:23, Alexey Edelev via Development wrote: Hi, I have a side question for this discussion(raised by Ivan in personal conversation): Should we also force the -fexec-charset= for the gcc-like compilers? Currently we use the system default one, which in most cases is UTF-8.

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

2024-06-19 Thread Alexey Edelev via Development
cht: Amtsgericht Charlottenburg, HRB 144331 B From: Development on behalf of Thiago Macieira Sent: Friday, June 7, 2024 6:25 PM To: development@qt-project.org Subject: Re: [Development] std::format support for Qt string types On Friday 7 June 2024 08:40:3

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

2024-06-13 Thread Ivan Solovev via Development
From: Development on behalf of Thiago Macieira Sent: Friday, June 7, 2024 6:25 PM To: development@qt-project.org Subject: Re: [Development] std::format support for Qt string types On Friday 7 June 2024 08:40:33 GMT-7 Ivan Solovev via Development wrote: > IIUC, the prob

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

2024-06-07 Thread Thiago Macieira
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,

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

2024-06-07 Thread Ivan Solovev via Development
velopment@qt-project.org Subject: Re: [Development] std::format support for Qt string types 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: &g

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

2024-06-07 Thread Thiago Macieira
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

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

2024-06-07 Thread Giuseppe D'Angelo via Development
On 07/06/2024 10:53, Ivan Solovev via Development wrote: Hi > I think we should conceptually separate formatting from printing on a > terminal. std::format isn't /_just_/ for printing on terminals I agree. But the same question about encoding to be used is still valid here. > What do you

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

2024-06-07 Thread Edward Welbourne via Development
Peppe had said: >> I'm not following this. If I do >> >> std::format("{} {}", utf8string, latin1string) >> >> what am I supposed to get out? A string which is a mix of two different >> encodings? I don't think that's ever possibly wanted. Ivan Solovev (7 June 2024 10:53) replied: > Yes, that's

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

2024-06-07 Thread Ivan Solovev via Development
arlottenburg, HRB 144331 B ________________ From: Development on behalf of Thiago Macieira Sent: Thursday, June 6, 2024 7:08 PM To: development@qt-project.org Subject: Re: [Development] std::format support for Qt string types On Thursday 6 June 2024 08:07:31 GMT-7 Giuseppe D'Ange

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

2024-06-06 Thread Thiago Macieira
On Thursday 6 June 2024 08:07:31 GMT-7 Giuseppe D'Angelo via Development wrote: > I'm not following this. If I do > > std::format("{} {}", utf8string, latin1string) > > what am I supposed to get out? A string which is a mix of two different > encodings? I don't think that's ever possibly

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

2024-06-06 Thread Thiago Macieira
On Thursday 6 June 2024 08:07:31 GMT-7 Giuseppe D'Angelo via Development wrote: > Again, I'm not really sure of entangling consoles with this. > If you go for this approach and std::print a QString on Windows, what > kind of output do you get? Garbage. Terminal-printing on Windows is fatally

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

2024-06-06 Thread Giuseppe D'Angelo via Development
Hello, On 05/06/2024 15:18, Ivan Solovev via Development wrote: Hi, I'm now working on introducing std::format support for some of the Qt types. I decided to start with the variety of Qt string types, and I have some open question regarding the implementation that I want to discuss. First,

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

2024-06-05 Thread Ivan Solovev via Development
Hi, I'm now working on introducing std::format support for some of the Qt types. I decided to start with the variety of Qt string types, and I have some open question regarding the implementation that I want to discuss. First, I'd like to give a very short summary of my understanding of how