This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/10530] [3.4 regression] Cannot access non-dependent type within nested template
- From: "GccBugs at Skyler dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jul 2003 01:16:21 -0000
- Subject: [Bug c++/10530] [3.4 regression] Cannot access non-dependent type within nested template
- References: <20030428233601.10530.giovannibajo@libero.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10530
------- Additional Comments From GccBugs at Skyler dot com 2003-07-21 01:16 -------
Is this related:
struct Base2 { };
template<class T>
struct Base1
{
template<class U>
struct TypeDef { typedef Base2 SecondBase; };
};
template<class T>
struct Derived : public Base1<int>,
public
Base1<T>::TypeDef<float>::SecondBase
{ };
int main (void)
{ Derived<long> derived; }
g++ 3.2 under Cygwin in Win2K produces:
t.cpp: In instantiation of `Derived<long int>':
t.cpp:16: instantiated from here
t.cpp:16: base class `Base1<T>::TypeDef<float>::SecondBase' has incomplete type
Make either template a non-template class and the error message goes away.