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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150488 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2012-02-14 16:03:09 +00:00
parent 982331b66e
commit 5f3f35fe64

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