forked from OSchip/llvm-project
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:
parent
4d9cbffbe2
commit
e586ac735d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue