This is the mail archive of the gcc@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]

template typedef


I hope I'm not stirring up an old hornets nest with this mailing ... I'm
only new to this list ...

I recently observed some discussion in comp.lang.c++.moderated about a
template typedef, ie: if we have the template class:

template<class A, class B> class Foo {};

Then allowing a template typedef would be:

template <class A> typedef Foo<int,A> Bar2;

thus allowing:

Bar2 <MyClass> some_variable;

This facility is not supported by compilers (possibly suggesting my
posting might be stupid).
I know it can be faked using nested template classes ... however, it was
commented in comp.lang.c++.moderated that a template typedef should be
legal according to BNF grammar ...

Whats the vibe on this?  Could this feature be included in future
releases?  Is this a naive request?





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