If I have a base class with a constructor :
class Base{
Base(std::optional<type0> a, std::optional<type1> b, std::optional<type2> c, std::optional<type3> d) : _a(a), _b(b), _c(c), _d(d) { }
private:
std::optional<type0> _a;
std::optional<type1> _b;
std::optional<type2> _c;
std::optional<type3> _d;
};
Can my derived classes derive this constructor with only some of the values and will it automatically map it to the right values? For example if I do:
class Derived{
Derived(std::optional<type1> b, std::optional<type3> d) : Base(b, d) { }
};
Will it automatically map b to _b
and d to _d
?