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)
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)
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) { }
254 : __shared_ptr<_Tp>(std::move(__r)) { }
259 : __shared_ptr<_Tp>(std::move(__r)) { }
267 : __shared_ptr<_Tp>(__p) { }
275 this->__shared_ptr<_Tp>::operator=(__r);
284 this->__shared_ptr<_Tp>::operator=(std::move(__r));
292 this->__shared_ptr<_Tp>::operator=(std::move(__r));
300 this->__shared_ptr<_Tp>::operator=(std::move(__r));
308 this->__shared_ptr<_Tp>::operator=(std::move(__r));
317 : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
331 template<typename _Tp>
333 operator==(const shared_ptr<_Tp>& __a, nullptr_t)
336 template<typename _Tp>
338 operator==(nullptr_t, const shared_ptr<_Tp>& __b)
346 template<typename _Tp>
348 operator!=(const shared_ptr<_Tp>& __a, nullptr_t)
351 template<typename _Tp>
353 operator!=(nullptr_t, const shared_ptr<_Tp>& __b)
361 template<typename _Tp>
362 struct less<shared_ptr<_Tp>> : public _Sp_less<shared_ptr<_Tp>>
366 template<typename _Tp>
368 swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b)
372 template<typename _Tp, typename _Tp1>
373 inline shared_ptr<_Tp>
375 { return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); }
377 template<typename _Tp, typename _Tp1>
378 inline shared_ptr<_Tp>
380 { return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); }
382 template<typename _Tp, typename _Tp1>
383 inline shared_ptr<_Tp>
386 if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
387 return shared_ptr<_Tp>(__r, __p);
388 return shared_ptr<_Tp>();
397 template<typename _Tp>
398 class weak_ptr : public __weak_ptr<_Tp>
402 : __weak_ptr<_Tp>() { }
405 std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
407 : __weak_ptr<_Tp>(__r) { }
410 std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
412 : __weak_ptr<_Tp>(__r) { }
418 this->__weak_ptr<_Tp>::operator=(__r);
426 this->__weak_ptr<_Tp>::operator=(__r);
430 shared_ptr<_Tp>
435 return shared_ptr<_Tp>();
439 return shared_ptr<_Tp>(*this);
443 return shared_ptr<_Tp>();
446 return this->expired() ? shared_ptr<_Tp>() : shared_ptr<_Tp>(*this);
452 template<typename _Tp>
454 swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b)
459 template<typename _Tp>
463 template<typename _Tp>
464 struct owner_less<shared_ptr<_Tp>>
465 : public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>>
469 template<typename _Tp>
470 struct owner_less<weak_ptr<_Tp>>
471 : public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>>
477 template<typename _Tp>
492 shared_ptr<_Tp>
494 { return shared_ptr<_Tp>(this->_M_weak_this); }
496 shared_ptr<const _Tp>
498 { return shared_ptr<const _Tp>(this->_M_weak_this); }
516 mutable weak_ptr<_Tp> _M_weak_this;
522 * @param __args Arguments for the @a _Tp object's constructor.
525 * constructor of @a _Tp.
530 template<typename _Tp, typename _Alloc, typename... _Args>
531 inline shared_ptr<_Tp>
534 return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a,
540 * @param __args Arguments for the @a _Tp object's constructor.
543 * constructor of @a _Tp.
545 template<typename _Tp, typename... _Args>
546 inline shared_ptr<_Tp>
549 typedef typename std::remove_const<_Tp>::type _Tp_nc;
550 return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
555 template<typename _Tp>
556 struct hash<shared_ptr<_Tp>>
557 : public std::unary_function<shared_ptr<_Tp>, size_t>
560 operator()(const shared_ptr<_Tp>& __s) const noexcept
561 { return std::hash<_Tp*>()(__s.get()); }