Affected subclause: [class.inhctor.init]
Change: Inheriting a constructor no longer injects a constructor into the derived class
. Rationale: Better interaction with other language features
. Effect on original feature: Valid C++ 2014 code that uses inheriting constructors may not be valid
or may have different semantics
. A
using-declaration
that names a constructor now makes the corresponding base class constructors
visible to initializations of the derived class
rather than declaring additional derived class constructors
.
struct A {
template<typename T> A(T, typename T::type = 0);
A(int);
};
struct B : A {
using A::A;
B(int);
};
B b(42L);