help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undefined references to variable problem


From: Maett
Subject: Re: Undefined references to variable problem
Date: Mon, 03 Oct 2005 17:54:32 +0200
User-agent: Opera M2/7.54 (Win32, build 3929)

Simon Buchan wrote:

Thomas Maeder wrote:
Simon Buchan <simon@hand-multimedia.co.nz> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]