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

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Mon Mar 26 19:47:00 GMT 2007



------- 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



More information about the Gcc-bugs mailing list