C++ Logo

sg16

Advanced search

Re: [isocpp-sg16] Follow up on SG16 review of P2996R2 (Reflection for C++26)

From: Peter Dimov <pdimov_at_[hidden]>
Date: Thu, 9 May 2024 16:07:48 +0300
Tiago Freire wrote:
> No, the input to your tee is the singular interface. Your tee expects an input
> encoding, and if the outputs of your tee have 2 different encodings you have
> to transcode, and you need to put that somewhere, so you are going to need 2
> buffers.

Yes, and if the input encoding is UTF-8, it can transcode to the two others
"as well as possible", but if it's something else, it can't, in general.

> Are we talking about different things?

Yes, probably. I don't see how you can claim the things you claim, because
it's pretty obvious that if you insert "foo", u8"foo", and L"foo" into the
same stream, you can't avoid transcoding at least two of these three times.

Received on 2024-05-09 13:07:52