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] typename in a using declaration not supported


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

Elias Pipping <pipping at exherbo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pipping at exherbo dot org

--- Comment #18 from Elias Pipping <pipping at exherbo dot org> ---
I'm a bit confused here. Please consider the following piece of code:

<<SNIP

template <typename T> struct A {
  typedef int type;
};

template <typename T> struct B : public A<T> {
  using typename A<T>::type;
  static const int block_size = type::block_size;
};

<<SNAP

Compiling it with gcc 4.8.2 yields

  foo.hh:9:33: error: âtypeâ is not a class, namespace, or enumeration

whereas clang 3.4 will happily accept it(*).

At a first glance, this bug appears to address issues such as this, so that gcc
4.8.2 should be fine. This does not seem to be the case, however -- the test
case provided by Jim Apple compiles but the one above does not; I'll have to
assume the bug was only partly fixed?


(*) I orginally thought this was not valid and filed a clang bug:
http://llvm.org/bugs/show_bug.cgi?id=18574

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