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++/14258] New: using typename (only when necessary) in a using declaration reports bogus error


The following code:

template<typename T>
struct A {
  typedef A type;
};
                                                                               
                            
template<typename T>
struct B : A<T> {
  using typename A<T>::type;
  type f(type);
};

Give a "syntax error before typename." Without typename in the using
declaration, however, type in B<T> is not a typename, so f's declaration is not
well formed.

Because the "typename" is necessary, this is not the same as bug 3033.

-- 
           Summary: using typename (only when necessary) in a using
                    declaration reports bogus error
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: japple at freeshell dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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