[Bug c++/12057] gcc compilation errors for nested template classes.

sharadmp at yahoo dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 25 19:06: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



------- Additional Comments From sharadmp at yahoo dot com  2003-08-25 19:06 -------
Subject: Re:  New: gcc compilation errors for nested template classes.

FW:
--- sharadmp at yahoo dot com
<gcc-bugzilla@gcc.gnu.org> wrote:
> 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;
>     };
> }
> 
> 
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> You are on the CC list for the bug, or are watching
> someone who is.


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Gcc-bugs mailing list