Provide a move(const T&) overload for C++03 mode to enable moving from rvalues. This is to support proxy references. Fixes r10858112.

llvm-svn: 150488
This commit is contained in:
Howard Hinnant 2012-02-14 16:03:09 +00:00
parent 4d9cbffbe2
commit e586ac735d
1 changed files with 12 additions and 0 deletions

View File

@ -1318,6 +1318,18 @@ move(_Tp& __t)
return __t;
}
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
!is_convertible<_Tp, __rv<_Tp> >::value,
const _Tp&
>::type
move(const _Tp& __t)
{
return __t;
}
template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if