C++ Logo

std-discussion

Advanced search

User Defined literal suffix identifier Standard Library Exception

From: Deslauriers, Douglas <Douglas.Deslauriers_at_[hidden]>
Date: Mon, 10 Jul 2023 20:42:04 +0000
I am considering submitting a defect report for a small technicality in
the latest draft in regards to [over.literal]p1.

https://eel.is/c++draft/over.literal#1

It claims,

> Some literal suffix identifiers are reserved for future
standardization; see [usrlit.suffix].
> A declaration whose literal-operator-id uses such a literal suffix
identifier is ill-formed, no diagnostic required.

However some declarations in the Standard Library, notably operator""s
in the <string> header, along with some others in the <chrono> and
<complex> headers, seem to violate this rule and including these
headers would make a program ill-formed.

I believe the intention of "reserved for future standardization" means
that declarations in the Standard Library should be exempt from the
second quoted sentence above.

Should I submit a defect report to add an exemption for the standard
library, and if so would it fall into the editorial or technical
category?

Regards,
Douglas Deslauriers

Received on 2023-07-10 20:42:07