PR c++/61488
* pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
From-SVN: r211704
2014-06-13 Jason Merrill <jason@redhat.com>
+ PR c++/61488
+ * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
+
PR c++/61500
* tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
return true;
if (cxx_dialect >= cxx11 && null_member_pointer_value_p (expr))
return true;
+ if (processing_template_decl
+ && TREE_CODE (expr) == ADDR_EXPR
+ && TREE_CODE (TREE_OPERAND (expr, 0)) == OFFSET_REF)
+ return true;
if (complain & tf_error)
{
error ("%qE is not a valid template argument for type %qT",
--- /dev/null
+// PR c++/61488
+
+struct A {
+ typedef int (A::*cont_func)();
+ template <A::cont_func> void wait(int);
+ int notify();
+
+ void fix() { wait<&A::notify>(0); } // OK
+ template <int> void repair() { wait<&A::notify>(0); }
+};