Names beginning with _ or __
According to the C++ standard, names beginning with either "__" or a single "_" followed by a capitalized alphabetic letter are "reserved to the implementation". I'm not sure what defines "implementation" here. Are we talking about, for example, STL?
Does that mean that certain include guards that are formatted as follows are illegal?
Code:
#define __CFooClass_h__
I'm pretty sure this would be illegal:
Code:
int _SomeGlobalInt = 0;
And this:
Code:
int __anotherGlobal = 2;
And also this:
Code:
void _SomeFunction( int param ) {}
Mainly I'm confused about preprocessor names (whether the underscore rule applies to them) and the lack of emphasis on the definition of 'Implementation' by the standard.
What kind of conflicts would we be looking at here? Link stage conflicts?
Thanks for reading.
--MrDoomMaster
--C++ Game Programmer
Don't forget to rate me if I was helpful!