* typeck.c (comp_template_parms_position): 'auto' and
'decltype(auto)' are different from real template parms.
From-SVN: r208414
2014-03-07 Jason Merrill <jason@redhat.com>
+ * typeck.c (comp_template_parms_position): 'auto' and
+ 'decltype(auto)' are different from real template parms.
+
* parser.c (cp_parser_using_declaration): Consume the semicolon
after bare parameter pack error.
!= TEMPLATE_PARM_PARAMETER_PACK (index2)))
return false;
+ /* In C++14 we can end up comparing 'auto' to a normal template
+ parameter. Don't confuse them. */
+ if (cxx_dialect >= cxx1y && (is_auto (t1) || is_auto (t2)))
+ return TYPE_IDENTIFIER (t1) == TYPE_IDENTIFIER (t2);
+
return true;
}
void foo()
{
- A<0>().operator auto(); // { dg-error "auto.*conversion" }
+ A<0>().operator auto(); // { dg-error "auto" }
}