I'd like to provide a constructor definition only once – for both lvalue and rvalue.
class A;class B { B(A const& a): B(A(a)) {} B(A&&);};
Is B::B(A&&) guaranteed to be called by B::B(A const&)?
B::B(A&&)
B::B(A const&)
Aucun commentaire:
Enregistrer un commentaire