std::tuple
contains, amongst others, the following constructors:
explicit tuple( const Types&... args );
template< class... UTypes >
explicit tuple( UTypes&&... args );
Both have equivalent descriptions in that they initialise each of the elements with the corresponding value in args
. The only difference is that in the second the parameters are forwarded.
From what I have understood about rvalue references, I don't see why the first version is required since the same parameters could be passed into the second version. The references would be forwarded and no-one would any the wiser especially as there is no mention of move semantics.
Can anyone explain what it is that makes both constructors necessary?