Home | History | Annotate | Download | only in bits

Lines Matching refs:_Tp

64   template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
67 const __shared_ptr<_Tp, _Lp>& __p)
74 template<typename _Del, typename _Tp, _Lock_policy _Lp>
76 get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept
92 template<typename _Tp>
93 class shared_ptr : public __shared_ptr<_Tp>
101 : __shared_ptr<_Tp>() { }
113 : __shared_ptr<_Tp>(__p) { }
130 : __shared_ptr<_Tp>(__p, __d) { }
147 : __shared_ptr<_Tp>(__p, __d) { }
166 : __shared_ptr<_Tp>(__p, __d, std::move(__a)) { }
185 : __shared_ptr<_Tp>(__p, __d, std::move(__a)) { }
206 shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p) noexcept
207 : __shared_ptr<_Tp>(__r, __p) { }
217 std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
219 : __shared_ptr<_Tp>(__r) { }
227 : __shared_ptr<_Tp>(std::move(__r)) { }
235 std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
237 : __shared_ptr<_Tp>(std::move(__r)) { }
249 : __shared_ptr<_Tp>(__r) { }
258 : __shared_ptr<_Tp>(std::move(__r)) { }
266 : __shared_ptr<_Tp>(__p) { }
274 this->__shared_ptr<_Tp>::operator=(__r);
283 this->__shared_ptr<_Tp>::operator=(std::move(__r));
291 this->__shared_ptr<_Tp>::operator=(std::move(__r));
299 this->__shared_ptr<_Tp>::operator=(std::move(__r));
307 this->__shared_ptr<_Tp>::operator=(std::move(__r));
316 : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
331 template<typename _Tp>
333 operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
336 template<typename _Tp>
338 operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
347 template<typename _Tp>
349 operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
352 template<typename _Tp>
354 operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
366 template<typename _Tp>
368 operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
369 { return std::less<_Tp*>()(__a.get(), nullptr); }
371 template<typename _Tp>
373 operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
374 { return std::less<_Tp*>()(nullptr, __a.get()); }
382 template<typename _Tp>
384 operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
387 template<typename _Tp>
389 operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
398 template<typename _Tp>
400 operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
401 { return std::less<_Tp*>()(nullptr, __a.get()); }
403 template<typename _Tp>
405 operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
406 { return std::less<_Tp*>()(__a.get(), nullptr); }
414 template<typename _Tp>
416 operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
419 template<typename _Tp>
421 operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
424 template<typename _Tp>
425 struct less<shared_ptr<_Tp>> : public _Sp_less<shared_ptr<_Tp>>
429 template<typename _Tp>
431 swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept
435 template<typename _Tp, typename _Tp1>
436 inline shared_ptr<_Tp>
438 { return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); }
440 template<typename _Tp, typename _Tp1>
441 inline shared_ptr<_Tp>
443 { return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); }
445 template<typename _Tp, typename _Tp1>
446 inline shared_ptr<_Tp>
449 if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
450 return shared_ptr<_Tp>(__r, __p);
451 return shared_ptr<_Tp>();
460 template<typename _Tp>
461 class weak_ptr : public __weak_ptr<_Tp>
465 : __weak_ptr<_Tp>() { }
468 std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
470 : __weak_ptr<_Tp>(__r) { }
473 std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
475 : __weak_ptr<_Tp>(__r) { }
481 this->__weak_ptr<_Tp>::operator=(__r);
489 this->__weak_ptr<_Tp>::operator=(__r);
493 shared_ptr<_Tp>
498 return shared_ptr<_Tp>();
502 return shared_ptr<_Tp>(*this);
506 return shared_ptr<_Tp>();
509 return this->expired() ? shared_ptr<_Tp>() : shared_ptr<_Tp>(*this);
515 template<typename _Tp>
517 swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept
522 template<typename _Tp>
526 template<typename _Tp>
527 struct owner_less<shared_ptr<_Tp>>
528 : public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>>
532 template<typename _Tp>
533 struct owner_less<weak_ptr<_Tp>>
534 : public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>>
540 template<typename _Tp>
555 shared_ptr<_Tp>
557 { return shared_ptr<_Tp>(this->_M_weak_this); }
559 shared_ptr<const _Tp>
561 { return shared_ptr<const _Tp>(this->_M_weak_this); }
579 mutable weak_ptr<_Tp> _M_weak_this;
585 * @param __args Arguments for the @a _Tp object's constructor.
588 * constructor of @a _Tp.
593 template<typename _Tp, typename _Alloc, typename... _Args>
594 inline shared_ptr<_Tp>
597 return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a,
603 * @param __args Arguments for the @a _Tp object's constructor.
606 * constructor of @a _Tp.
608 template<typename _Tp, typename... _Args>
609 inline shared_ptr<_Tp>
612 typedef typename std::remove_const<_Tp>::type _Tp_nc;
613 return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
618 template<typename _Tp>
619 struct hash<shared_ptr<_Tp>>
620 : public __hash_base<size_t, shared_ptr<_Tp>>
623 operator()(const shared_ptr<_Tp>& __s) const noexcept
624 { return std::hash<_Tp*>()(__s.get()); }