From -1047905026786270714 X-Google-Thread: f78e5,d2ef22ccb120b652 X-Google-Attributes: gidf78e5,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull From: AlbertoBarbati@libero.it (Alberto Barbati) Newsgroups: comp.std.c++ Subject: Re: A::A::A::A Date: Tue, 5 Oct 2004 04:37:26 GMT Organization: [Infostrada] Lines: 29 Sender: mail2news@demon.net Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++) Message-ID: <2wk8d.24685$N45.637605@twister2.libero.it> References: NNTP-Posting-Host: news.news.demon.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.demon.co.uk 1096951051 23159 158.152.254.254 (5 Oct 2004 04:37:31 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Tue, 5 Oct 2004 04:37:31 +0000 (UTC) X-Received-SPF: none (mailbox10.ucsd.edu: domain of news@twister2.libero.it does not designate permitted sender hosts) X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Virus-Scanned: by amavisd-new at libero.it serv3 X-Path: comp-std-cpp-robomod!not-for-mail X-Received: (from fjh@localhost) by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i954bQqp026464; Tue, 5 Oct 2004 14:37:26 +1000 (EST) X-NNTP-Posting-Date: Tue, 05 Oct 2004 00:53:50 MET DST X-Delivered-To: std-c++@ucar.edu X-Spamscanner: mailbox10.ucsd.edu (v1.5 Aug 25 2004 09:28:35, 0.0/5.0 3.0.0-rc1) X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on mulga.cs.mu.OZ.AU X-Accept-Language: en, it X-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.64-mulga_r1 X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-Newsgroups: comp.std.c++ X-MailScanner: PASSED (v1.2.8 94212 i94Ms6G1097227 mailbox10.ucsd.edu) Xref: g2news1.google.com comp.std.c++:2957 Giovanni Bajo wrote: > Is this code really valid? > > struct A { > void foo() {} > }; > > void bar() { > A a; > a.A::A::A::A::A::A::foo(); > } > AFAIK, the syntax A::whatever refers to a member of class A. Although the name A is injected in the scope of A, it's not a member of A, so writing A::A is illegal. Notice that it doesn't even refer to the class constructor, because constructors have no name. That said, applying ::A a second or more times won't improve the situation, so the answer is definitely no. Alberto --- [ 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 ]