commit 1d678e7704b74e7dfc0c927c47a0271c8d599b7c
Author: Jason Merrill <jason@redhat.com>
Date: Mon Jul 8 23:36:12 2013 -0400
PR c++/57831
* pt.c (tsubst_copy): Handle USING_DECL.
@@ -12508,6 +12508,9 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
case TYPE_DECL:
return tsubst (t, args, complain, in_decl);
+ case USING_DECL:
+ t = DECL_NAME (t);
+ /* Fall through. */
case IDENTIFIER_NODE:
if (IDENTIFIER_TYPENAME_P (t))
{
new file mode 100644
@@ -0,0 +1,15 @@
+// PR c++/57831
+
+struct A {
+ void f();
+};
+template <class T> struct B : T {
+ typedef T base;
+ using base::f; // If I write "using B<T>::f" it's ok
+ void g( ) {
+ B<T>::f(); // This is OK as expected
+ (this->*&T::f)(); // This is also OK
+ (this->*&B<T>::f)(); // This causes error
+ }
+};
+template struct B< A >;