C++ Logo

sg16

Advanced search

Re: Agenda for the 2024-04-24 SG16 meeting

From: Victor Zverovich <victor.zverovich_at_[hidden]>
Date: Wed, 24 Apr 2024 08:54:05 -0700
>
> Consider:
> make_class_definition("abc\\u1234")
>
> The string-literal-to-object conversion yields the code unit
> sequence "abc\u1234" and then the consumer (i.e. make_class_definition)
> interprets universal-character-names once more, and we get an
> (ostensibly valid) class-name (assuming \u1234 is a valid identifier
> character, which I don't know right now).
>
> That double interpretation feels surprising and wrong.
>
>
> Can you identify where that feeling comes from? It seems just right to me.
>

It seems very natural to me as well and exactly how I would expect this API
to work. We already have escaping in some formatters and if we had
corresponding scanners I would also expect them to behave similarly and
"undo" escaping.

- Victor

Received on 2024-04-24 15:54:19