完美无缺。 但是,如果我想要而不是<>,那么我怎么做,那么,就什么时候,什么是模版?
template<typename T> void foo(T&& ref);
template<typename T> void foo(const T& ref);
Won t work because the first overload will invoke perfect forwarding. I d really like behaviour very similar to if the first was a normal lvalue reference- where T will always be a value type.