what is ISO/IEC 14882:2011(E) [reserved.names]/2 means?

58 Views Asked by At

first at all, let's see the standard(ISO/IEC 14882:2011(E))

[reserved.names](17.6.4.3) said:

1 The C++ standard library reserves the following kinds of names:
— macros
— global names
— names with external linkage

2 If a program declares or defines a name in a context where it is reserved, other than as explicitly allowed by this Clause, its behavior is undefined.

[global.names](17.6.4.3.2) said:

1 Certain sets of names and function signatures are always reserved to the implementation:
— Each name that contains a double underscore __ or begins with an underscore followed by an uppercase letter (2.12) is reserved to the implementation for any use.
— Each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace.

Q1: what is explicitly allowed in [reserved.names]/2 or in which case a name is explicitly allowed?

Q2: Does that means we can use a name that begins with an underscore followed by an lowercase letter in local namespace? If so is that so-called explicitly allowed?

0

There are 0 best solutions below