This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Possible accepts invalid in C++: Thing::Thing::...::Thing::
- From: John Love-Jensen <eljay at adobe dot com>
- To: "Smith-Rowland, Edward M" <ESmith-rowland at alionscience dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Tue, 25 Sep 2007 06:27:56 -0500
- Subject: 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