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 #1 from bangerth at dealii dot org  2007-03-23 06:26 -------
Or smaller like this:
------------------
template <class T> struct Base {
        typename T::X X;
};

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

sunCC also rejects it. I tend to believe that the code is invalid because
at the time where we instantiate Base<A> (in the base class list of A), A 
is not complete and so the inner typedef is not available yet.

What makes you think that the code should compile?

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org


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]