Emplace method of definition container not forwarding arguments correctly
Closed this issue · 2 comments
phijor commented
bmario commented
Args&&...
seems like a good idea, but I'm not convinced that the forward is required. If you look at cppreference it says that the return value of forward_as_tuple
is:
std::tuple<Types&&...>(std::forward<Types>(args)...)
So there is already a forward.
Flamefire commented
@phijor is correct: https://godbolt.org/g/NPMueV
(expected) Errors:
/opt/compiler-explorer/gcc-8.1.0/include/c++/8.1.0/tuple:1668:70: error: no matching function for call to 'std::__cxx11::basic_string::basic_string(int&, const char*&)'
vs
/opt/compiler-explorer/gcc-8.1.0/include/c++/8.1.0/tuple:1668:70: error: no matching function for call to 'std::__cxx11::basic_string::basic_string(int&, const char*)'