Let\'s say I have two overloads of a function f. f(T&&) and f(T&).
Then in the body of g:
g(T&&
In g() t is a named variable. All named variables are lvalues. If T is a template type then you can forward the variable to f() using std::forward. This will call f() with the same type as was passed to g()
template
g(T&& t) { f(std::forward(t));}
If T is not a template type but just a type then you can use std::move
g(T&& t) { f(std:move(t)); }