Topic: User-defined literal suffixes with or without underscore?
Author: McNepp <mcnepp02@googlemail.com>
Date: Wed, 25 May 2011 01:09:35 CST Raw View
2.14.8 of the latest Standard deals with user-defined literals.
Some of the examples use the suffix "w" for the declaration of a user-
defined literal.
OTOH, 17.6.4.3.5 User-defined literal suffixes
states "1 Literal suffix identifiers that do not start with an
underscore are reserved for future standardization."
Shouldn't the examples match this requirement?
--
[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.com>
Date: Wed, 25 May 2011 08:53:13 CST Raw View
On 2011-05-25 09:09, McNepp wrote:
>
> 2.14.8 of the latest Standard deals with user-defined literals.
> Some of the examples use the suffix "w" for the declaration of a user-
> defined literal.
>
> OTOH, 17.6.4.3.5 User-defined literal suffixes
>
> states "1 Literal suffix identifiers that do not start with an
> underscore are reserved for future standardization."
>
> Shouldn't the examples match this requirement?
Yes. Are you sure that you checked the most recent draft or FDIS? I find
only _w as identifier in the documents N3290 and N3291. Also, a new
normative wording has been added to 2.14.8:
"Some identifiers appearing as ud-suffixes are reserved for future
standardization (17.6.4.3.5). A program containing such a ud-suffix is
ill-formed, no diagnostic required."
This was done, because it is possible to read 17.6.4.3.5 in a way that
this would only be a library-relevant constraint. The addition to 2.14.8
*and* the renaming of the examples clarified that this is a
language-wide requirement.
HTH & Greetings from Bremen,
- Daniel Kr gler
--
[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]