* name-lookup.c (do_class_using_decl): Set CLASSTYPE_NON_AGGREGATE.
From-SVN: r242563
2016-11-17 Jason Merrill <jason@redhat.com>
+ PR c++/78124 - list-initialization and inherited ctor
+ * name-lookup.c (do_class_using_decl): Set CLASSTYPE_NON_AGGREGATE.
+
PR c++/78369 - {} as default argument
* call.c (build_special_member_call): Handle CONSTRUCTOR.
extern tree in_class_defaulted_default_constructor (tree);
extern bool user_provided_p (tree);
extern bool type_has_user_provided_constructor (tree);
-extern bool type_has_user_provided_or_explicit_constructor (tree);
extern bool type_has_non_user_provided_default_constructor (tree);
extern bool vbase_has_user_provided_move_assign (tree);
extern tree default_init_uninitialized_part (tree);
{
maybe_warn_cpp0x (CPP0X_INHERITING_CTORS);
name = ctor_identifier;
+ CLASSTYPE_NON_AGGREGATE (current_class_type) = true;
}
if (constructor_name_p (name, current_class_type))
{
--- /dev/null
+// PR c++/78124
+// { dg-do compile { target c++11 } }
+
+struct base {
+ explicit constexpr base(int&&) {}
+};
+
+struct derived: base {
+ using base::base;
+};
+
+int main()
+{
+ derived d { 0 };
+}
+