Simon Buchan wrote:

Thomas Maeder wrote:
Simon Buchan <[EMAIL PROTECTED]> writes:


More accurately, names begining with /two/ underscores, or an
underscore followed by a capital are reserved for the vendor by the
standard,


Even more accurately, names beginning with _[A-Z] or *containing* __
are reserved.


ie:
__special_vendor_name,
_Special_vendor_name2.
Just an underscore is generally fine, especially uglifing variables
for class initialisation:


No. These names are also reserved, but just in the global
namespace. Which is enough for me not to declare them in user code
either ...



        class X {
                int y;
        public:
                X(int _y) : y(_y) {}
        };


... even if this is ok, since this name does not belong to the global
namespace.

OK, thanks for the corrections.  (Where did you find the "containing
'__'" restriction? The standard?)


See Section 17.4.3.1.2

Cheers
Maett
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to