[Bug c++/12057] New: gcc compilation errors for nested template classes.
sharadmp at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Mon Aug 25 18:41:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12057
Summary: gcc compilation errors for nested template classes.
Product: gcc
Version: 2.96 (redhat)
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sharadmp at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org,sharadmp at yahoo dot
com
Iam trying to compile c++ code with nested classes. The compiler gcc 2.96
gives following error:
'ArrayListImpl<ValueType>::Itr' doesnot have a nested type named `Impl`
My brief code snippet is shown below:It uses friend class as shown.
template<class ValueType = Object> class ArrayListImpl :
public List<ValueType::Impl {
private:
class Itr;
class Itr::Impl; //GIVES ABOVE ERROR AT THIS LINE//
......
friend class Itr;
}
template<class ValueType> class ArrayListImpl<ValueType>::Itr :
public Iterator<ValueType>{
private:
class Impl : public Iterator<ValueType>::Impl {
....
friend class Itr;
};
}
More information about the Gcc-bugs
mailing list