🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3171

Re: Observations on templates

#3171
From: Jason Merrill
Date: Thu, 01 Feb 1996 00:07
25 lines
1882 bytes
>>>>> Jason Merrill <jason@cygnus.com> writes:
>>>>> Eugene Radchenko <eugene@qsar.chem.msu.su> writes:

>> 3) Clause [temp.arg.explicit] verses 2-3 requires that for explicit arg in
>> member template to be present it must be qualified by 'template' keyword,
>> e.g.
>> X *p; p->template alloc<200>();
>> But to use operator -> we need X class definition anyway - so we know that
>> alloc() is a template.

> It is needed in some situations where we do not have the X class definition
> -- in template definitions, like with typename.

But then, the rule in the WP applies regardless of whether we know about X.
I conclude that the idea was to allow the parser to do its work without
peeking into classes to find names used after . or ->; another rule along
the same lines requires that a scope used after . or -> have the same
meaning in the ambient scope and the scope of the object specified.

Jason


[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <u9ohrk0wjc.fsf@yorick.cygnus.com>
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
References: <ACVI83na99@qsar.chem.msu.su> <u9vilu8zvz.fsf@yorick.cygnus.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
From: jason@cygnus.com (Jason Merrill)
Newsgroups: comp.std.c++
Subject: Re: Observations on templates
Date: 1 Feb 1996 00:07:06 GMT
Organization: Cygnus Support, Mountain View, CA
Sender: jason@cygnus.com
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <u9ohrk0wjc.fsf@yorick.cygnus.com>
References: <ACVI83na99@qsar.chem.msu.su> <u9vilu8zvz.fsf@yorick.cygnus.com>
NNTP-Posting-Host: taumet.eng.sun.com
Mime-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
X-Nntp-Posting-Host: yorick.cygnus.com
In-Reply-To: jason@cygnus.com's message of Tue, 30 Jan 1996 04:52:15 GMT
X-Newsreader: Gnus v5.0
X-Lines: 21
Content-Length: 905
Originator: clamage@taumet