summaryrefslogtreecommitdiff
path: root/include/memory
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2016-02-25 16:50:51 +0000
committerMarshall Clow <mclow.lists@gmail.com>2016-02-25 16:50:51 +0000
commit61d4dd0390570ed1e37ced76613fa3259276cd96 (patch)
treede70d8c3a24f49abaf45812288bee6b7f1cbfa72 /include/memory
parent17a80bc8b6f492f4aeebf6e83386ecb91bcc9ca1 (diff)
Another chunk of N4089
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/memory')
-rw-r--r--include/memory21
1 files changed, 2 insertions, 19 deletions
diff --git a/include/memory b/include/memory
index 3ef687c17..281c59eb4 100644
--- a/include/memory
+++ b/include/memory
@@ -2548,7 +2548,7 @@ public:
typename enable_if<__same_or_less_cv_qualified<_Up*, _Tp*>::value>::type* = 0) const _NOEXCEPT
{
static_assert(sizeof(_Tp) > 0, "default_delete can not delete incomplete type");
- static_assert(!is_void<_Tp>::value, "default_delete can not delete incomplete type");
+ static_assert(!is_void<_Tp>::value, "default_delete can not delete void type");
delete [] __ptr;
}
};
@@ -2918,7 +2918,6 @@ public:
return __t;
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Pp>
_LIBCPP_INLINE_VISIBILITY
typename enable_if<__same_or_less_cv_qualified<_Pp, pointer>::value, void>::type
@@ -2929,29 +2928,13 @@ public:
if (__tmp)
__ptr_.second()(__tmp);
}
- _LIBCPP_INLINE_VISIBILITY void reset(nullptr_t) _NOEXCEPT
- {
- pointer __tmp = __ptr_.first();
- __ptr_.first() = nullptr;
- if (__tmp)
- __ptr_.second()(__tmp);
- }
- _LIBCPP_INLINE_VISIBILITY void reset() _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY void reset(nullptr_t = nullptr) _NOEXCEPT
{
pointer __tmp = __ptr_.first();
__ptr_.first() = nullptr;
if (__tmp)
__ptr_.second()(__tmp);
}
-#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
- _LIBCPP_INLINE_VISIBILITY void reset(pointer __p = pointer())
- {
- pointer __tmp = __ptr_.first();
- __ptr_.first() = __p;
- if (__tmp)
- __ptr_.second()(__tmp);
- }
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY void swap(unique_ptr& __u) {__ptr_.swap(__u.__ptr_);}
private: