#include
template
typename std::remove_reference::type&& move(T&& v)
{
return v;
}
void main()
{
This is straight out of the C++0x draft standard (§20.2.3/6):
template
typename remove_reference ::type&& move(T&& t) noexcept; Returns:
static_cast
.::type&&>(t)
Consequently, if you change your move
implementation to the following, it works just fine:
template
typename std::remove_reference::type&& move(T&& v)
{
return static_cast::type&&>(v);
}