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

[Bug c++/31323] typename A::B * p; in template definition, with curiously recurring template inheritance



------- Comment #3 from bangerth at dealii dot org  2007-03-26 20:46 -------
(In reply to comment #2)
> well, priv is a pointer..

What I really meant was a typedef:
----------------
template <class T> struct Base {
    typedef typename T::X X;
};

struct A : Base<A>
{
    typedef int X;
};
----------------

But still, what part of the standard makes you think that this should be
valid code?

W.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31323


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