g*********s 发帖数: 1782 | 1 17.6.3.3.2 Global names [global.names]
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.
what does "implementation" mean here?
is the following a problem?
class X {
int __x;
int _X;
int _x;
int x_;
}; |
g*********s 发帖数: 1782 | 2 17.6.3.3.2 Global names [global.names]
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.
what does "implementation" mean here?
is the following a problem?
class X {
int __x;
int _X;
int _x;
int x_;
}; |
r****t 发帖数: 10904 | 3 ding
I guess implementation means the compiler, as you see these names in the
libstdc++ headers so yes in the example class it would a problem (at least
in terms of clarity).
the
【在 g*********s 的大作中提到】 : 17.6.3.3.2 Global names [global.names] : 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. : what does "implementation" mean here? : is the following a problem?
|