This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14258] typename in a using declaration not supported
- From: "pipping at exherbo dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Jan 2014 10:25:57 +0000
- Subject: [Bug c++/14258] typename in a using declaration not supported
- Auto-submitted: auto-generated
- References: <bug-14258-4 at http dot gcc dot gnu dot org/bugzilla/>
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