Lines Matching refs:_Alloc

212 template <class _Tp, class _Dp, class _Alloc>
216 __compressed_pair<__compressed_pair<_Tp, _Dp>, _Alloc> __data_;
219 __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a)
233 template <class _Tp, class _Dp, class _Alloc>
235 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT
242 template <class _Tp, class _Dp, class _Alloc>
244 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__on_zero_shared() _NOEXCEPT
250 template <class _Tp, class _Dp, class _Alloc>
252 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__on_zero_shared_weak() _NOEXCEPT
254 typedef typename __allocator_traits_rebind<_Alloc, __shared_ptr_pointer>::type _Al;
259 __data_.second().~_Alloc();
268 template <class _Tp, class _Alloc>
274 explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args)
278 if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
282 using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
292 _Alloc* __get_alloc() _NOEXCEPT { return __storage_.__get_alloc(); }
300 if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
303 using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
313 using _ControlBlockAlloc = typename __allocator_traits_rebind<_Alloc, __shared_ptr_emplace>::type;
325 // both the _Alloc and the _Tp. This implies using EBO, which is incompatible
329 using _CompressedPair = __compressed_pair<_Alloc, _Tp>;
333 _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) {
334 ::new ((void*)__get_alloc()) _Alloc(_VSTD::move(__a));
337 __get_alloc()->~_Alloc();
339 _Alloc* __get_alloc() _NOEXCEPT {
342 _Alloc *__alloc = reinterpret_cast<_Alloc*>(__first);
533 template<class _Yp, class _Dp, class _Alloc, class = __enable_if_t<__shared_ptr_deleter_ctor_reqs<_Dp, _Yp, _Tp>::value> >
535 shared_ptr(_Yp* __p, _Dp __d, _Alloc __a)
542 typedef __shared_ptr_pointer<_Yp*, _Dp, _Alloc> _CntrlBlk;
543 typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _A2;
591 template<class _Dp, class _Alloc>
593 shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a)
600 typedef __shared_ptr_pointer<nullptr_t, _Dp, _Alloc> _CntrlBlk;
601 typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _A2;
832 template<class _Yp, class _Dp, class _Alloc, class = __enable_if_t<
835 void reset(_Yp* __p, _Dp __d, _Alloc __a)
988 template<class _Tp, class _Alloc, class ..._Args, class = __enable_if_t<!is_array<_Tp>::value> >
990 shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&& ...__args)
992 using _ControlBlock = __shared_ptr_emplace<_Tp, _Alloc>;
993 using _ControlBlockAllocator = typename __allocator_traits_rebind<_Alloc, _ControlBlock>::type;
1009 template<class _Tp, class _Alloc, __enable_if_t<!is_array<_Tp>::value, int> = 0>
1011 shared_ptr<_Tp> allocate_shared_for_overwrite(const _Alloc& __a)
1013 using _ForOverwriteAllocator = __allocator_traits_rebind_t<_Alloc, __for_overwrite_tag>;
1034 template <class _Tp, class _Alloc>
1037 template <class _Tp, class _Alloc>
1038 struct __unbounded_array_control_block<_Tp[], _Alloc> : __shared_weak_count
1044 explicit __unbounded_array_control_block(_Alloc const& __alloc, size_t __count, _Tp const& __arg)
1051 explicit __unbounded_array_control_block(_Alloc const& __alloc, size_t __count)
1055 if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
1089 if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
1092 __allocator_traits_rebind_t<_Alloc, _Tp> __value_alloc(__alloc_);
1096 __allocator_traits_rebind_t<_Alloc, _Tp> __value_alloc(__alloc_);
1103 using _StorageAlloc = __allocator_traits_rebind_t<_Alloc, _AlignedStorage>;
1107 __alloc_.~_Alloc();
1113 _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_;
1120 template<class _Array, class _Alloc, class... _Arg>
1122 shared_ptr<_Array> __allocate_shared_unbounded_array(const _Alloc& __a, size_t __n, _Arg&& ...__arg)
1129 using _ControlBlock = __unbounded_array_control_block<_Array, _Alloc>;
1131 using _StorageAlloc = __allocator_traits_rebind_t<_Alloc, _AlignedStorage>;
1139 template <class _Tp, class _Alloc>
1142 template <class _Tp, size_t _Count, class _Alloc>
1143 struct __bounded_array_control_block<_Tp[_Count], _Alloc>
1150 explicit __bounded_array_control_block(_Alloc const& __alloc, _Tp const& __arg) : __alloc_(__alloc) {
1155 explicit __bounded_array_control_block(_Alloc const& __alloc) : __alloc_(__alloc) {
1157 if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
1175 if constexpr (is_same_v<typename _Alloc::value_type, __for_overwrite_tag>) {
1178 __allocator_traits_rebind_t<_Alloc, _Tp> __value_alloc(__alloc_);
1182 __allocator_traits_rebind_t<_Alloc, _Tp> __value_alloc(__alloc_);
1188 using _ControlBlockAlloc = __allocator_traits_rebind_t<_Alloc, __bounded_array_control_block>;
1192 __alloc_.~_Alloc();
1196 _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_;
1202 template<class _Array, class _Alloc, class... _Arg>
1204 shared_ptr<_Array> __allocate_shared_bounded_array(const _Alloc& __a, _Arg&& ...__arg)
1207 using _ControlBlock = __bounded_array_control_block<_Array, _Alloc>;
1208 using _ControlBlockAlloc = __allocator_traits_rebind_t<_Alloc, _ControlBlock>;
1222 template<class _Tp, class _Alloc, class = __enable_if_t<is_bounded_array<_Tp>::value>>
1224 shared_ptr<_Tp> allocate_shared(const _Alloc& __a)
1229 template<class _Tp, class _Alloc, class = __enable_if_t<is_bounded_array<_Tp>::value>>
1231 shared_ptr<_Tp> allocate_shared(const _Alloc& __a, const remove_extent_t<_Tp>& __u)
1236 template<class _Tp, class _Alloc, __enable_if_t<is_bounded_array<_Tp>::value, int> = 0>
1238 shared_ptr<_Tp> allocate_shared_for_overwrite(const _Alloc& __a)
1240 using _ForOverwriteAllocator = __allocator_traits_rebind_t<_Alloc, __for_overwrite_tag>;
1267 template<class _Tp, class _Alloc, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
1269 shared_ptr<_Tp> allocate_shared(const _Alloc& __a, size_t __n)
1274 template<class _Tp, class _Alloc, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
1276 shared_ptr<_Tp> allocate_shared(const _Alloc& __a, size_t __n, const remove_extent_t<_Tp>& __u)
1281 template<class _Tp, class _Alloc, __enable_if_t<is_unbounded_array<_Tp>::value, int> = 0>
1283 shared_ptr<_Tp> allocate_shared_for_overwrite(const _Alloc& __a, size_t __n)
1285 using _ForOverwriteAllocator = __allocator_traits_rebind_t<_Alloc, __for_overwrite_tag>;