This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Possible accepts invalid in C++: Thing::Thing::...::Thing::


Hi Ed,

> What do the language gurus say?

I think what happens - and I think is correct to the ISO 14882 - is each
Thing:: indicates "look for a scope called 'Thing'", and for a class name
(rather than a namespace) the class name itself is scope accessible inside
its own scope (which isn't the case for a namespace).

As a coding convention, I'd suggest "Avoid doing that, even though the
compiler allows it."

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]