std::remove_reference explained?
问题 I saw possible implementations for std::remove_reference as below template< class T > struct remove_reference {typedef T type;}; template< class T > struct remove_reference<T&> {typedef T type;}; template< class T > struct remove_reference<T&&> {typedef T type;}; Why is it that there are specializations for lvalue and rvalue reference ? Won't the general template itself be sufficient and remove the reference? I'm confused here because in the T& or T&& specialization if I try to use ::type I