How does std::forward work, especially when passing lvalue/rvalue references? [duplicate]
I think the explanation of std::forward as static_cast<T&&> is confusing. Our intuition for a cast is that it converts a type to some other type — in this case it would be a conversion to an rvalue reference. It’s not! So we are explaining one mysterious thing using another mysterious thing. This particular cast is …