From 5828639479389381540
X-Google-Thread: f78e5,d2ef22ccb120b652
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: gdr@cs.tamu.edu (Gabriel Dos Reis)
Newsgroups: comp.std.c++
Subject: Re: A::A::A::A
Date: Wed,  6 Oct 2004 03:49:11 GMT
Organization: Texas A&M University, Department of Computer Science
Lines: 32
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <m33c0spv0a.fsf@merlin.cs.tamu.edu>
References: <mQb8d.23473$N45.607983@twister2.libero.it> <619f36eb.0410050311.725da58f@posting.google.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.demon.co.uk 1097034554 405 158.152.254.254 (6 Oct 2004 03:49:14 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 6 Oct 2004 03:49:14 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=2.64-mulga_r1
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i963nBsj002489;
	Wed, 6 Oct 2004 13:49:11 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Spam-Level: 
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Path: g2news1.google.com!news1.google.com!newshub.sdsu.edu!news.zanker.org!news.amigo.co.uk!news.clara.net!wagner.news.clara.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
Xref: g2news1.google.com comp.std.c++:2986

sgganesh@gmail.com (Ganesh) writes:

| > Is this code really valid?
| >    a.A::A::A::A::A::A::foo();
| >From 3.4.5[4], "If the name is found only in the scope of the class of
| the object expression, the name shall refer to a class-name". Since
| the qualifying "class-name-or-namespace-name" is not a class-name, it
| is not valid.
| 
| However, in the compilers I checked the code with, g++ 3.2, aCC 3.55,
| comeau online, it passed. In VC++, it gives a misleading error "error
| 2039: '__ctor' : is not a member of 'A'"; might be that the vc++
| compiler confuses series of A::A as constructors and tries to
| interpret it.

I believe VC++ correctly rejects the code because it implements DR
#whatever, that went into the TC1 as 3.4.3.1/1a.

G++ does not implement that rule.

-- 
                                                        Gabriel Dos Reis
                                                         gdr@cs.tamu.edu
	 Texas A&M University -- Computer Science Department
	301, Bright Building -- College Station, TX 77843-3112

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



