In std::forward how does it accept rvalue?
问题 Looking at Scott Meyer's Effective Modern C++ pages 200-201, the suggested simplified implementation of std::forward could be (did see the proper implementation elsewhere): template <typename T> T&& forward(std::remove_reference_t<T>& param) { return static_cast<T&&>(param); } And when accepting an rvalue Widget, it becomes: Widget&& forward(Widget& param) { return static_cast<Widget&&>(param); } Now, if you take that substituted code, and do: struct Widget { }; Widget&& forward(Widget& param