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++/12057] New: gcc compilation errors for nested template classes.


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


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