template<typename T> T foo(T&& t) { return T(t); } int main() { int x; foo(x); }
So, I know T=int& here but I don't understand what happens at return line to make this vaild. Can someone explain how?
Aucun commentaire:
Enregistrer un commentaire