diff options
Diffstat (limited to 'contrib/libc++/include/memory')
-rw-r--r-- | contrib/libc++/include/memory | 60 |
1 files changed, 18 insertions, 42 deletions
diff --git a/contrib/libc++/include/memory b/contrib/libc++/include/memory index aa24f96..e30a6fd 100644 --- a/contrib/libc++/include/memory +++ b/contrib/libc++/include/memory @@ -1685,39 +1685,21 @@ public: ::new((void*)__p) _Tp(); } # if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) + template <class _A0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - !is_convertible<_A0, __rv<_A0> >::value, - void - >::type + void construct(pointer __p, _A0& __a0) { ::new((void*)__p) _Tp(__a0); } template <class _A0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - !is_convertible<_A0, __rv<_A0> >::value, - void - >::type + void construct(pointer __p, const _A0& __a0) { ::new((void*)__p) _Tp(__a0); } - template <class _A0> - _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - is_convertible<_A0, __rv<_A0> >::value, - void - >::type - construct(pointer __p, _A0 __a0) - { - ::new((void*)__p) _Tp(_VSTD::move(__a0)); - } # endif // defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) template <class _A0, class _A1> _LIBCPP_INLINE_VISIBILITY @@ -1793,39 +1775,21 @@ public: ::new((void*)__p) _Tp(); } # if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) + template <class _A0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - !is_convertible<_A0, __rv<_A0> >::value, - void - >::type + void construct(pointer __p, _A0& __a0) { ::new((void*)__p) _Tp(__a0); } template <class _A0> _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - !is_convertible<_A0, __rv<_A0> >::value, - void - >::type + void construct(pointer __p, const _A0& __a0) { ::new((void*)__p) _Tp(__a0); } - template <class _A0> - _LIBCPP_INLINE_VISIBILITY - typename enable_if - < - is_convertible<_A0, __rv<_A0> >::value, - void - >::type - construct(pointer __p, _A0 __a0) - { - ::new((void*)__p) _Tp(_VSTD::move(__a0)); - } # endif // defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) template <class _A0, class _A1> _LIBCPP_INLINE_VISIBILITY @@ -3086,6 +3050,18 @@ operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x) return !(nullptr < __x); } +#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES + +template <class _Tp, class _Dp> +inline _LIBCPP_INLINE_VISIBILITY +unique_ptr<_Tp, _Dp> +move(unique_ptr<_Tp, _Dp>& __t) +{ + return unique_ptr<_Tp, _Dp>(__rv<unique_ptr<_Tp, _Dp> >(__t)); +} + +#endif + template <class _Tp> struct hash; // We use murmur2 when size_t is 32 bits, and cityhash64 when size_t |