std::tuple contains, among others, the following constructors:
explicit tuple( const Types&... args ); template< class... UTypes > explicit tuple( UTypes&&... args );
Both have equivalent descriptions in which they initialize each of the elements with the corresponding value in args . The only difference is that in the second the parameters are redirected.
From what I understood about rvalue links, I don’t understand why the first version is required, since the same parameters can be passed to the second version. Links will be redirected and no one will be wiser, especially if the semantics of movement are not mentioned.
Can someone explain what it is that makes both constructors necessary?
Dryap source share