PR c++/67159
* constraint.cc (finish_template_introduction):
SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
From-SVN: r226738
2015-08-08 Jason Merrill <jason@redhat.com>
+ PR c++/67159
+ * constraint.cc (finish_template_introduction):
+ SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
+
PR c++/67142
* pt.c (equal): Make sure tmpl is actually a template.
tree parm = TREE_VEC_ELT (parm_list, n);
TREE_VEC_ELT (check_args, n) = template_parm_to_arg (parm);
}
+ SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (check_args, n);
/* If the template expects more parameters we should be able
to use the defaults from our deduced concept. */
--- /dev/null
+// PR c++/67159
+// { dg-options -std=c++1z }
+
+template <class T>
+concept bool R = requires (T& t) {
+ { t.begin() } -> T
+};
+
+struct foo {
+ int* begin();
+};
+
+R{T}
+constexpr bool f() { return true; }
+
+static_assert(f<foo>()); // { dg-error "" }