Home | History | Annotate | Download | only in bits

Lines Matching defs:unique_ptr

0 // unique_ptr implementation -*- C++ -*-
25 /** @file bits/unique_ptr.h
107 /// 20.7.1.2 unique_ptr for single objects.
109 class unique_ptr
135 constexpr unique_ptr() noexcept
141 unique_ptr(pointer __p) noexcept
146 unique_ptr(pointer __p,
151 unique_ptr(pointer __p,
157 constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }
160 unique_ptr(unique_ptr&& __u) noexcept
164 is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>,
169 unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
176 unique_ptr(auto_ptr<_Up>&& __u) noexcept;
180 ~unique_ptr() noexcept
189 unique_ptr&
190 operator=(unique_ptr&& __u) noexcept
199 is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>,
202 unique_ptr&>::type
203 operator=(unique_ptr<_Up, _Ep>&& __u) noexcept
210 unique_ptr&
266 swap(unique_ptr& __u) noexcept
273 unique_ptr(const unique_ptr&) = delete;
274 unique_ptr& operator=(const unique_ptr&) = delete;
277 /// 20.7.1.3 unique_ptr for array objects with a runtime length
282 class unique_ptr<_Tp[], _Dp>
313 typename _Up_pointer = typename unique_ptr<_Up, _Ep>::pointer>
329 constexpr unique_ptr() noexcept
335 unique_ptr(pointer __p) noexcept
343 unique_ptr(_Up* __p) = delete;
345 unique_ptr(pointer __p,
350 unique_ptr(pointer __p, typename
357 unique_ptr(unique_ptr&& __u) noexcept
360 constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }
368 unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
373 ~unique_ptr()
382 unique_ptr&
383 operator=(unique_ptr&& __u) noexcept
392 enable_if<__safe_conversion<_Up, _Ep>::value, unique_ptr&>::type
393 operator=(unique_ptr<_Up, _Ep>&& __u) noexcept
400 unique_ptr&
457 swap(unique_ptr& __u) noexcept
464 unique_ptr(const unique_ptr&) = delete;
465 unique_ptr& operator=(const unique_ptr&) = delete;
470 unique_ptr(_Up*, typename
476 unique_ptr(_Up*, typename
482 swap(unique_ptr<_Tp, _Dp>& __x,
483 unique_ptr<_Tp, _Dp>& __y) noexcept
489 operator==(const unique_ptr<_Tp, _Dp>& __x,
490 const unique_ptr<_Up, _Ep>& __y)
495 operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept
500 operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
506 operator!=(const unique_ptr<_Tp, _Dp>& __x,
507 const unique_ptr<_Up, _Ep>& __y)
512 operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept
517 operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
523 operator<(const unique_ptr<_Tp, _Dp>& __x,
524 const unique_ptr<_Up, _Ep>& __y)
527 std::common_type<typename unique_ptr<_Tp, _Dp>::pointer,
528 typename unique_ptr<_Up, _Ep>::pointer>::type _CT;
534 operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
535 { return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(__x.get(),
540 operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
541 { return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(nullptr,
547 operator<=(const unique_ptr<_Tp, _Dp>& __x,
548 const unique_ptr<_Up, _Ep>& __y)
553 operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
558 operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
564 operator>(const unique_ptr<_Tp, _Dp>& __x,
565 const unique_ptr<_Up, _Ep>& __y)
570 operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
571 { return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(nullptr,
576 operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
577 { return std::less<typename unique_ptr<_Tp, _Dp>::pointer>()(__x.get(),
583 operator>=(const unique_ptr<_Tp, _Dp>& __x,
584 const unique_ptr<_Up, _Ep>& __y)
589 operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
594 operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
597 /// std::hash specialization for unique_ptr.
599 struct hash<unique_ptr<_Tp, _Dp>>
600 : public __hash_base<size_t, unique_ptr<_Tp, _Dp>>
603 operator()(const unique_ptr<_Tp, _Dp>& __u) const noexcept
605 typedef unique_ptr<_Tp, _Dp> _UP;