PR c++/67054 - Inherited ctor with non-default-constructible members
* method.c (walk_field_subobs) Consider member initializers (NSDMIs)
when deducing an inheriting constructor.
From-SVN: r250583
+2017-07-26 Leonid Koppel <lkoppel@uwaterloo.ca>
+
+ PR c++/67054 - Inherited ctor with non-default-constructible members
+ * method.c (walk_field_subobs) Consider member initializers (NSDMIs)
+ when deducing an inheriting constructor.
+
2017-07-21 Nathan Sidwell <nathan@acm.org>
* search.c (lookup_conversion_operator): Return overloads.
if (bad && deleted_p)
*deleted_p = true;
}
- else if (sfk == sfk_constructor)
+ else if (sfk == sfk_constructor || sfk == sfk_inheriting_constructor)
{
bool bad;
--- /dev/null
+// PR c++/67054
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ A(int) {}
+};
+
+struct C
+{
+ C(int) {}
+};
+
+struct B : A
+{
+ using A::A;
+ C c = 42;
+};
+
+int main()
+{
+ B b = 24;
+}