From 5917205514459242313 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,64409d9769f709f0 X-Google-Attributes: gidf78e5,public X-Google-Thread: 109fba,64409d9769f709f0 X-Google-Attributes: gid109fba,public From: "Jason Hunter" Subject: Re: Is this legal C++? Date: 1998/08/06 Message-ID: <01bdc170$c51f6970$17031712@dialup-337>#1/1 X-Deja-AN: 378618165 X-NNTP-Posting-Host: dialup-337.lcs.mit.edu Approved: stephen.clamage@sun.com (comp.std.c++) References: <01bdc100$f82d21b0$19011a12@bwing> X-UID: 0000000001 X-Status: $$$T Organization: Massachvsetts Institvte of Technology Newsgroups: comp.lang.c++,comp.std.c++ Originator: clamage@taumet > Foo() > { > T a; > > a.T::Bar(); // this works! > a.T::T(); // C2039: 'T' is not a member of Bar. > } > }; > As a followup to my own question, I wanted to point out that it is the explicit call to the constructor that I am interested in. For those not clear, this causes the constructor to be called on the "a" object again without the destructor being called. (Actually this is a paired down example the real storage is allocated from an untyped block of memory and has never been initialized - that is why I need to explicitly call the constructor on it because it has not yet been called.) Thanks, Jason Hunter jthunter[PLEASE REMOVE THIS - SPAMBLOCK]@mit.edu [ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]