C++ Logo

sg16

Advanced search

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

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Thu, 9 May 2024 13:27:39 +0000
I think we need to draw it out. I will try to setup a sample repo to work this out. I will comeback to this once I got the time.

-----Original Message-----
From: Peter Dimov <pdimov_at_gmail.com>
Sent: Thursday, May 9, 2024 15:08
To: 'Tiago Freire' <tmiguelf_at_[hidden]>; sg16_at_lists.isocpp.org; 'Victor Zverovich' <victor.zverovich_at_gmail.com>
Cc: 'Tom Honermann' <tom_at_[hidden]>; 'Faisal Vali' <faisalv_at_gmail.com>; 'Dan Katz' <dkatz85_at_bloomberg.net>; 'Barry Revzin' <barry.revzin_at_gmail.com>; 'Andrew Sutton' <andrew.n.sutton_at_gmail.com>; 'Daveed Vandevoorde' <daveed_at_edg.com>; 'Wyatt Childers' <wcc_at_edg.com>
Subject: RE: [isocpp-sg16] [SG16] Follow up on SG16 review of P2996R2 (Reflection for C++26)

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:27:42