data().HasTrivialMoveAssignment = false;
// C++11 [class.ctor]p6:
- // If that user-written default cosntructor would satisfy the
+ // If that user-written default constructor would satisfy the
// requirements of a constexpr constructor, the implicitly-defined
// default constructor is constexpr.
if (!BaseClassDecl->hasConstexprDefaultConstructor())
// would be ill-formed, the implicit move constructor generated for the
// derived class calls the base class' copy constructor.
data().DefaultedMoveConstructorIsConstexpr &=
- !BaseClassDecl->hasConstexprMoveConstructor();
+ BaseClassDecl->hasConstexprMoveConstructor();
else if (!BaseClassDecl->hasConstexprCopyConstructor())
data().DefaultedMoveConstructorIsConstexpr = false;
}
constexpr Constexpr4 c4a = { ncd };
constexpr Constexpr4 c4b = Constexpr4(c4a);
constexpr Constexpr4 c4c = Constexpr4(static_cast<Constexpr4&&>(const_cast<Constexpr4&>(c4b)));
+
+struct Constexpr5Base {};
+struct Constexpr5 : Constexpr5Base { constexpr Constexpr5() {} };
+constexpr Constexpr5 ce5move = Constexpr5();
+constexpr Constexpr5 ce5copy = ce5move;