std::forward vs static_cast


For perfect forwarding, I am still trying to give an use case in which std::forward<T> works but static_cast<T&&> doesn’t.
It was suggested just to use static_cast<T&&> to implement std::forward<T>, but it had problems.
I’d like to pin point the problem with the simplest snippet.
It’s very much appreciated if you have a solution to share with me.

Advertisements
Comments are closed.
%d bloggers like this: