C++ Logo

sg16

Advanced search

Re: Follow up on SG16 review of P2996R2 (Reflection for C++26)

From: Peter Dimov <pdimov_at_[hidden]>
Date: Mon, 29 Apr 2024 23:15:27 +0300
Tom Honermann wrote:
> Here is another option:
>
> 1. Require that consumers of names like data_member_spec() accept
> UNC-like encoded characters (UNC-like because these wouldn't actually be
> UNCs).
> 2. Require that producers of names like name_of() only generate a UNC-
> like encoded character when the associated (ordinary/wide literal) encoding
> lacks representation for the character.

That's probably not half bad, however (2) needs to also encode when the
string contains the (fully representable) sequence \u or \U.

Received on 2024-04-29 20:15:32