I read inheriting constructors question and I broadly understand c++ constructor inheritance.
class X;
class A {
A(const A& a); // (1)
A(const X& x); // (2)
};
class B : A {
using A::A;
}
Copy constructors are specials so I cannot use (1) to build a B from an A although I can use (2) to build a B form an X;
However I can add a templated constructor in B:
template<class...T> B(T... t) : A(t...) {}
This templated constructor will allow to build a B form an A.
I want to know what are the side effects of this method and what constructors does it effectively defines ?
For instance, can I move an A to a B this way. Do I still need the using A::A
declaration in B? Do I need to add some std::forward black magic?