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++/11351] New: typedef to nested template causes error


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11351

           Summary: typedef to nested template causes error
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: benko at sztaki dot hu
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu

If this is an error at all, it's a regression from 3.3.
If struct a below is non-template, then it compiles through.

arta:~/c/proba$ cat templ_typedef.cc
template <typename T>
struct a
{
  template <typename U>
  struct i
  {};
};

template <typename T, typename U>
struct b
{
  typedef typename a<T>::i<U> a_t; // line 12
};
arta:~/c/proba$ g++-cvs -c templ_typedef.cc 
templ_typedef.cc:12: error: expected unqualified-id
zsh: exit 1     g++-cvs -c templ_typedef.cc
arta:~/c/proba$ g++-cvs -v
Reading specs from /gml/shared/gcc-cvs/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --prefix=/gml/shared/gcc-cvs
--enable-languages=c++
Thread model: posix
gcc version 3.4 20030626 (experimental)
arta:~/c/proba$


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