[Adopted at the October, 2015 meeting as P0136R1.] Consider the following example: The copy constructor is invoked by the inherited constructor
template, making it effectively inherited, contrary to the intent of
_N4527_.12.9 [class.inhctor] paragraph 3. std::function is
affected by this issue. A kernel of a resolution might be to inherit the copy and
move constructors as deleted. Then they will be more
specialized than any template, and the user won't get
conversion-from-base behavior unless they explicitly declare
it. However, reference binding in overload resolution is a
potential gap. Something like b::b( a & ) = delete with
a non-const parameter would not add safety if it's not
chosen. See also issue 1941.
struct a {
a() = default;
a( a const & ) { std::cout << "copy\n"; }
template< typename t >
a( t ) { std::cout << "convert\n"; }
};
struct b : a {
using a::a;
};
a x;
b y = x;