PR c++/67054 - Inherited ctor with non-default-constructible members

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
This commit is contained in:
Leonid Koppel 2017-07-26 17:39:26 +00:00 committed by Jason Merrill
parent aca97ef824
commit 80e7cb2d6b
3 changed files with 30 additions and 1 deletions

View file

@ -1,3 +1,9 @@
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.

View file

@ -1342,7 +1342,7 @@ walk_field_subobs (tree fields, tree fnname, special_function_kind sfk,
if (bad && deleted_p)
*deleted_p = true;
}
else if (sfk == sfk_constructor)
else if (sfk == sfk_constructor || sfk == sfk_inheriting_constructor)
{
bool bad;

View file

@ -0,0 +1,23 @@
// 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;
}