* pt.c (do_class_deduction): Ignore inherited ctors.
From-SVN: r259133
2018-04-05 Jason Merrill <jason@redhat.com>
+ PR c++/82152 - ICE with class deduction and inherited ctor.
+ * pt.c (do_class_deduction): Ignore inherited ctors.
+
PR c++/84665 - ICE with array of empty class.
* decl2.c (cp_check_const_attributes): Use fold_non_dependent_expr.
// FIXME cache artificial deduction guides
for (ovl_iterator iter (CLASSTYPE_CONSTRUCTORS (type)); iter; ++iter)
{
+ /* Skip inherited constructors. */
+ if (iter.using_p ())
+ continue;
+
tree guide = build_deduction_guide (*iter, outer_args, complain);
if (guide == error_mark_node)
return error_mark_node;
--- /dev/null
+// PR c++/82152
+// { dg-additional-options -std=c++17 }
+
+struct Base {};
+
+template<typename T>
+struct Derived : public Base {
+ using Base::Base;
+};
+
+Derived() -> Derived< void >;
+
+int main() {
+ Derived x;
+}