[Bug c++/46748] New: Error "using typename" in template class
ian at airs dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 1 15:23:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46748
Summary: Error "using typename" in template class
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ian@airs.com
When I compile this test case:
template<typename T> class B
{
public:
typedef int T2;
static void F(T* f, T2* v);
};
template<typename T> class D : public B<T>
{
public:
using typename B<T>::T2;
using B<T>::F;
static void F2(T* f) {
T2 v;
F(f, &v);
}
};
with current mainline, I get this:
foo.cc: In static member function ‘static void D<T>::F2(T*)’:
foo.cc:15:8: error: expected ‘;’ before ‘v’
foo.cc:16:11: error: ‘v’ was not declared in this scope
As far as I can see, this should work without an error.
More information about the Gcc-bugs
mailing list