Topic: Reserve user-defined literal namespace for implementation and standard?
Author: Ed Smith-Rowland <3dw4rd@verizon.net>
Date: Sat, 27 Feb 2010 20:38:01 CST Raw View
Greetings,
It might be a good idea to reserve a portion of the user-defined
literal namespace for implementations and/or the standard to prevent
future clashes.
I would recommend "__" two leading underscores for implementation-
defined literals. This may even be implied by other parts of the
standard though I couldn't see it. I don't think users will feel too
deprived of namespace and it fits well with policy elsewhere in the
standard.
I'm less sure about "std" or "std_" or "__std" but one of these might
also be a good idea for strictly standard-defined literals in the
future.
Of course we already have essentially "F", "L", "UL" etc. (with either
case, in various contexts) reserved for the standard. They will stay
obviously.
Ed Smith-Rowland
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: Scott Meyers <NeverRead@aristeia.com>
Date: Sun, 28 Feb 2010 10:20:21 CST Raw View
Ed Smith-Rowland wrote:
>
> It might be a good idea to reserve a portion of the user-defined
> literal namespace for implementations and/or the standard to prevent
> future clashes.
17.6.3.3.5 (in its entirety): "Literal suffix identifiers that do not
start with an underscore are reserved for future standardization."
Scott
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]