class Foo {
std::vector data_;
};
Say Foo can only be constructed by make a copy (technically I mean a copy or move)
The complexity problem of the performance optimal solution mentioned in Howard Hinnant's answer for constructors taking multiple arguments would be solved by use of perfect forwarding:
template
Foo(A0 && a0) : data_(std::forward(a0)) {}
In case of more parameters, extend accordingly:
template
Foo(A0 && a0, A1 && a1, ...)
: m0(std::forward(a0))
, m1(std::forward(a1))
, ...
{}