0

Looking at the signature of std::move():

template< class T >
typename std::remove_reference<T>::type&& move( T&& t ) noexcept;

it accepts an rvalue reference, but can be called with a non-reference value, e.g. std::string a = "a"; std::move(a). Why is this? What type will T have?

qweruiop
  • 3,156
  • 6
  • 31
  • 55

0 Answers0