PR c++/67142
* pt.c (equal): Make sure tmpl is actually a template.
From-SVN: r226737
2015-08-08 Jason Merrill <jason@redhat.com>
+ PR c++/67142
+ * pt.c (equal): Make sure tmpl is actually a template.
+
PR c++/67114
* call.c (joust): Only call more_constrained on decls.
equal = (e1->tmpl == e2->tmpl
&& comp_template_args (e1->args, e2->args));
if (equal && flag_concepts
+ /* tmpl could be a FIELD_DECL for a capture pack. */
+ && TREE_CODE (e1->tmpl) == TEMPLATE_DECL
&& VAR_P (DECL_TEMPLATE_RESULT (e1->tmpl))
&& uses_template_parms (e1->args))
{
--- /dev/null
+// PR c++/67142
+// { dg-options -std=c++1z }
+
+namespace detail {
+template <int> int split_at;
+}
+struct A {
+ decltype(0) operator()();
+};
+template <typename> A make;
+struct Tuple;
+auto check =
+ [](auto, auto, auto) { [](auto... xs) { [=] { make<Tuple>(xs...); }; }(); };
+int main() {
+ namespace vd = detail;
+ check(vd::split_at<0>, make<Tuple>, make<Tuple>);
+}