forked from OSchip/llvm-project
![]() the cases where we can't determine whether special members would be trivial while building the class, we eagerly declare those special members. The impact of this is bounded, since it does not trigger implicit declarations of special members in classes which merely *use* those classes. In order to determine whether we need to apply this rule, we also need to eagerly declare move operations and destructors in cases where they might be deleted. If a move operation were supposed to be deleted, it would instead be suppressed, and we could need overload resolution to determine if we fall back to a trivial copy operation. If a destructor were implicitly deleted, it would cause the move constructor of any derived classes to be suppressed. As discussed on cxx-abi-dev, C++11's selected constructor rules are also retroactively applied as a defect resolution in C++03 mode, in order to identify that class B has a non-trivial copy constructor (since it calls A's constructor template, not A's copy constructor): struct A { template<typename T> A(T &); }; struct B { mutable A a; }; llvm-svn: 169673 |
||
---|---|---|
.. | ||
implicit-move-def.cpp | ||
implicit-move.cpp | ||
p3.cpp | ||
p8-cxx11.cpp | ||
p9.cpp | ||
p11.0x.copy.cpp | ||
p11.0x.move.cpp | ||
p12-0x.cpp | ||
p13-0x.cpp | ||
p15-0x.cpp | ||
p15-inclass.cpp | ||
p18-cxx11.cpp | ||
p20.cpp | ||
p23-cxx11.cpp | ||
p25-0x.cpp | ||
p28-cxx11.cpp | ||
p33-0x.cpp |