You have to specify an explicit type for std::forward
pair<T1&&, T2&&> p(forward<T1>(t1), forward<T2>(t2));
The compiler won't be able to figure out the types of endl
either if you want to use it like that, so they must be specified too endl<char, char_traits<char>>
, you should probably be using '\n'
anyway.