This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH]: Some parser related fixes




--On Monday, January 27, 2003 09:12:43 AM +0000 Nathan Sidwell <nathan@codesourcery.com> wrote:

Mark Mitchell wrote:

--On Saturday, January 25, 2003 05:54:43 PM +0000 Nathan Sidwell
<nathan@codesourcery.com> wrote:

! template <class T> struct C: public A<T>::template B<T> { };
I thought you did not have to say "template" here, in the same way
that you do not have to say "typename" in this context.
oh. I did think you were allowed to say template here, but your DR314
shows that you're not, but should be. That DR is in drafting change.
So that part of my patch is ok.

The related DR343 is open, and indicates it should be optional. I don't
mind, what do you think?
Sounds OK to me.  If easy to implement, I'd suggest we allow, but do not
require, the template keyword in this context.

(I'm not sure why the committee decided to allow "template" here; DR
180 notes that "typename" is actually forbidden in this context, i.e.,
that you cannot say:

 template <class T>
 struct C : public typename A<T>::X { };

Hmm.)

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]