C++ Logo


Advanced search

Re: [SG16] [isocpp-lib-ext] Review of P2093R2: Formatted output

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Sat, 5 Dec 2020 22:31:40 +0100
On 05/12/2020 22.16, Tom Honermann wrote:
> On 11/28/20 11:33 AM, Victor Zverovich wrote:

>> > And then there is the facility of converting the C++ literal encoding to the console encoding, if necessary. Again, this should be a separate facility, preferably offering a generic transcoding facility that can be specialized for the console-only use case.
>> While I agree that such a transcoding facility would be useful I think it is out of scope of the current paper. The latter requires only minimal transcoding facilities for the Unicode case and only on some platforms where dedicated system APIs exist.
> I agree that distinct interfaces should be provided for each of these concerns, but I also think each can be pursued separately and need not hold up the proposed feature. We can always re-specify the proposed behavior in terms of new interfaces via as-if in the future.

Let me disagree here. It took years for to_chars (the underlying
elementary operation) to arrive after std::to_string was standardized.

I have no objection to providing high-level facilities in C++,
but I want the option to ignore those high-level facilities
if need be. Apparently, there is an appetite to differentiate
"writing to the console" vs. "writing to a file", and that
appears to be a useful low-level query to have.


Received on 2020-12-05 15:31:46