interopera con establecedores de punteros externos, obtiene el valor inicial del puntero desde un puntero inteligente y lo restablece en la destrucción
(plantilla de clase)
construye objetos mediante inicialización por defecto en un área de memoria no inicializada, definida por un rango (plantilla de función & objeto función de algoritmo)
construye objetos mediante inicialización por defecto en un área de memoria no inicializada, definida por un inicio y un recuento (plantilla de función & objeto función de algoritmo)
construye objetos mediante inicialización por valor en un área de memoria no inicializada, definida por un rango (plantilla de función & objeto función de algoritmo)
construye objetos mediante inicialización por valor en un área de memoria no inicializada, definida por un inicio y un recuento (plantilla de función & objeto función de algoritmo)
especializa operaciones atómicas para std::shared_ptr (plantilla de función)
Sinopsis
#include<compare>namespacestd{// pointer Traitstemplate<classPtr>structpointer_traits;// freestandingtemplate<classT>structpointer_traits<T*>;// freestanding// pointer conversiontemplate<classT>constexprT*to_address(T*p)noexcept;// freestandingtemplate<classPtr>constexprautoto_address(constPtr&p)noexcept;// freestanding// pointer alignmentvoid*align(size_talignment,size_tsize,void*&ptr,size_t&space);// freestandingtemplate<size_tN,classT>constexprT*assume_aligned(T*ptr);// freestandingtemplate<size_tAlignment,classT>boolis_sufficiently_aligned(T*ptr);// explicit lifetime managementtemplate<classT>T*start_lifetime_as(void*p)noexcept;// freestandingtemplate<classT>constT*start_lifetime_as(constvoid*p)noexcept;// freestandingtemplate<classT>volatileT*start_lifetime_as(volatilevoid*p)noexcept;// freestandingtemplate<classT>constvolatileT*start_lifetime_as(constvolatilevoid*p)noexcept;// freestandingtemplate<classT>T*start_lifetime_as_array(void*p,size_tn)noexcept;// freestandingtemplate<classT>constT*start_lifetime_as_array(constvoid*p,size_tn)noexcept;// freestandingtemplate<classT>volatileT*start_lifetime_as_array(volatilevoid*p,size_tn)noexcept;// freestandingtemplate<classT>constvolatileT*start_lifetime_as_array(constvolatilevoid*p,// freestandingsize_tn)noexcept;template<classT>T*trivially_relocate(T*first,T*last,T*result);// freestandingtemplate<classT>constexprT*relocate(T*first,T*last,T*result);// freestanding// allocator argument tagstructallocator_arg_t{explicitallocator_arg_t()=default;};// freestandinginlineconstexprallocator_arg_tallocator_arg{};// freestanding// uses_allocatortemplate<classT,classAlloc>structuses_allocator;// freestanding// uses_allocatortemplate<classT,classAlloc>constexprbooluses_allocator_v=uses_allocator<T,Alloc>::value;// freestanding// uses-allocator constructiontemplate<classT,classAlloc,class...Args>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingArgs&&...args)noexcept;template<classT,classAlloc,classTuple1,classTuple2>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingpiecewise_construct_t,Tuple1&&x,Tuple2&&y)noexcept;template<classT,classAlloc>constexprautouses_allocator_construction_args(constAlloc&alloc)noexcept;// freestandingtemplate<classT,classAlloc,classU,classV>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingU&&u,V&&v)noexcept;template<classT,classAlloc,classU,classV>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingpair<U,V>&pr)noexcept;template<classT,classAlloc,classU,classV>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingconstpair<U,V>&pr)noexcept;template<classT,classAlloc,classU,classV>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingpair<U,V>&&pr)noexcept;template<classT,classAlloc,classU,classV>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingconstpair<U,V>&&pr)noexcept;template<classT,classAlloc,/*pair-like*/P>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingP&&p)noexcept;template<classT,classAlloc,classU>constexprautouses_allocator_construction_args(constAlloc&alloc,// freestandingU&&u)noexcept;template<classT,classAlloc,class...Args>constexprTmake_obj_using_allocator(constAlloc&alloc,Args&&...args);// freestandingtemplate<classT,classAlloc,class...Args>constexprT*uninitialized_construct_using_allocator(T*p,// freestandingconstAlloc&alloc,Args&&...args);// allocator Traitstemplate<classAlloc>structallocator_traits;// freestandingtemplate<classPointer,classSizeType=size_t>structallocation_result{// freestandingPointerptr;SizeTypecount;};// the default allocatortemplate<classT>classallocator;template<classT,classU>constexprbooloperator==(constallocator<T>&,constallocator<U>&)noexcept;// addressoftemplate<classT>constexprT*addressof(T&r)noexcept;// freestandingtemplate<classT>constT*addressof(constT&&)=delete;// freestanding// specialized algorithms// special memory conceptstemplate<classI>conceptnothrow-input-iterator=/* see description */;// exposition-onlytemplate<classI>conceptnothrow-forward-iterator=/* see description */;// exposition-onlytemplate<classI>conceptnothrow-bidirectional-iterator=/* see description */;// exposition-onlytemplate<classI>conceptnothrow-random-access-iterator=/* see description */;// exposition-onlytemplate<classS,classI>conceptnothrow-sentinel-for=/* see description */;// exposition-onlytemplate<classS,classI>conceptnothrow-sized-sentinel-for=/* see description */;// exposition-onlytemplate<classR>conceptnothrow-input-range=/* see description */;// exposition-onlytemplate<classR>conceptnothrow-forward-range=/* see description */;// exposition-onlytemplate<classR>conceptnothrow-bidirectional-range=/* see description */;// exposition-onlytemplate<classR>conceptnothrow-random-access-range=/* see description */;// exposition-onlytemplate<classR>conceptnothrow-sized-random-access-range=/* see description */;// exposition-onlytemplate<classNoThrowForwardIter>constexprvoiduninitialized_default_construct(NoThrowForwardIterfirst,// freestandingNoThrowForwardIterlast);template<classExecutionPolicy,classNoThrowForwardIter>voiduninitialized_default_construct(ExecutionPolicy&&exec,// freestanding-deletedNoThrowForwardIterfirst,NoThrowForwardIterlast);template<classNoThrowForwardIter,classSize>constexprNoThrowForwardIteruninitialized_default_construct_n(NoThrowForwardIterfirst,Sizen);// freestandingtemplate<classExecutionPolicy,classNoThrowForwardIter,classSize>NoThrowForwardIteruninitialized_default_construct_n(ExecutionPolicy&&exec,// freestanding-deletedNoThrowForwardIterfirst,Sizen);namespaceranges{template<no-throw-forward-iteratorI,no-throw-sentinel-for<I>S>requiresdefault_initializable<iter_value_t<I>>constexprIuninitialized_default_construct(Ifirst,Slast);// freestandingtemplate<no-throw-forward-rangeR>requiresdefault_initializable<range_value_t<R>>constexprborrowed_iterator_t<R>uninitialized_default_construct(R&&r);// freestandingtemplate<no-throw-forward-iteratorI>requiresdefault_initializable<iter_value_t<I>>constexprIuninitialized_default_construct_n(Ifirst,// freestandingiter_difference_t<I>n);template<execution-policyEp,nothrow-random-access-iteratorI,nothrow-sized-sentinel-for<I>S>requiresdefault_initializable<iter_value_t<I>>Iuninitialized_default_construct(Ep&&exec,Ifirst,Slast);// freestanding-deletedtemplate<execution-policyEp,nothrow-sized-random-access-rangeR>requiresdefault_initializable<range_value_t<R>>borrowed_iterator_t<R>uninitialized_default_construct// freestanding-deleted(Ep&&exec,R&&r);template<execution-policyEp,nothrow-random-access-iteratorI>requiresdefault_initializable<iter_value_t<I>>Iuninitialized_default_construct_n(Ep&&exec,Ifirst,// freestanding-deletediter_difference_t<I>n);}template<classNoThrowForwardIter>constexprvoiduninitialized_value_construct(NoThrowForwardIterfirst,// freestandingNoThrowForwardIterlast);template<classExecutionPolicy,classNoThrowForwardIter>voiduninitialized_value_construct(ExecutionPolicy&&exec,// freestanding-deletedNoThrowForwardIterfirst,NoThrowForwardIterlast);template<classNoThrowForwardIter,classSize>constexprNoThrowForwardIteruninitialized_value_construct_n(NoThrowForwardIterfirst,Sizen);// freestandingtemplate<classExecutionPolicy,classNoThrowForwardIter,classSize>NoThrowForwardIteruninitialized_value_construct_n(ExecutionPolicy&&exec,// freestanding-deletedNoThrowForwardIterfirst,Sizen);namespaceranges{template<no-throw-forward-iteratorI,no-throw-sentinel-for<I>S>requiresdefault_initializable<iter_value_t<I>>constexprIuninitialized_value_construct(Ifirst,Slast);// freestandingtemplate<no-throw-forward-rangeR>requiresdefault_initializable<range_value_t<R>>constexprborrowed_iterator_t<R>uninitialized_value_construct(R&&r);// freestandingtemplate<no-throw-forward-iteratorI>requiresdefault_initializable<iter_value_t<I>>constexprIuninitialized_value_construct_n(Ifirst,// freestandingiter_difference_t<I>n);template<execution-policyEp,nothrow-random-access-iteratorI,nothrow-sized-sentinel-for<I>S>requiresdefault_initializable<iter_value_t<I>>Iuninitialized_value_construct(Ep&&exec,Ifirst,Slast);// freestanding-deletedtemplate<execution-policyEp,nothrow-sized-random-access-rangeR>requiresdefault_initializable<range_value_t<R>>borrowed_iterator_t<R>uninitialized_value_construct// freestanding-deleted(Ep&&exec,R&&r);template<execution-policyEp,nothrow-random-access-iteratorI>requiresdefault_initializable<iter_value_t<I>>Iuninitialized_value_construct_n(Ep&&exec,Ifirst,// freestanding-deletediter_difference_t<I>n);}template<classInputIter,classNoThrowForwardIter>constexprNoThrowForwardIteruninitialized_copy(InputIterfirst,// freestandingInputIterlast,NoThrowForwardIterresult);template<classExecutionPolicy,classForwardIter,classNoThrowForwardIter>NoThrowForwardIteruninitialized_copy(ExecutionPolicy&&exec,// freestanding-deletedForwardIterfirst,ForwardIterlast,NoThrowForwardIterresult);template<classInputIter,classSize,classNoThrowForwardIter>constexprNoThrowForwardIteruninitialized_copy_n(InputIterfirst,// freestandingSizen,NoThrowForwardIterresult);template<classExecutionPolicy,classForwardIter,classSize,classNoThrowForwardIter>NoThrowForwardIteruninitialized_copy_n(ExecutionPolicy&&exec,// freestanding-deletedForwardIterfirst,Sizen,NoThrowForwardIterresult);namespaceranges{template<classI,classO>usinguninitialized_copy_result=in_out_result<I,O>;// freestandingtemplate<input_iteratorI,sentinel_for<I>S1,no-throw-forward-iteratorO,no-throw-sentinel-for<O>S2>requiresconstructible_from<iter_value_t<O>,iter_reference_t<I>>constexpruninitialized_copy_result<I,O>uninitialized_copy(Iifirst,S1ilast,Oofirst,S2olast);// freestandingtemplate<input_rangeIR,no-throw-forward-rangeOR>requiresconstructible_from<range_value_t<OR>,range_reference_t<IR>>constexpruninitialized_copy_result<borrowed_iterator_t<IR>,borrowed_iterator_t<OR>>uninitialized_copy(IR&&in_range,OR&&out_range);// freestandingtemplate<classI,classO>usinguninitialized_copy_n_result=in_out_result<I,O>;// freestandingtemplate<input_iteratorI,no-throw-forward-iteratorO,no-throw-sentinel-for<O>S>requiresconstructible_from<iter_value_t<O>,iter_reference_t<I>>constexpruninitialized_copy_n_result<I,O>uninitialized_copy_n(Iifirst,iter_difference_t<I>n,// freestandingOofirst,Solast);template<execution-policyEp,random_access_iteratorI,sized_sentinel_for<I>S1,nothrow-random-access-iteratorO,nothrow-sized-sentinel-for<O>S2>requiresconstructible_from<iter_value_t<O>,iter_reference_t<I>>uninitialized_copy_result<I,O>uninitialized_copy(Ep&&exec,Iifirst,S1ilast,// freestanding-deletedOofirst,S2olast);template<execution-policyEp,sized-random-access-rangeIR,nothrow-sized-random-access-rangeOR>requiresconstructible_from<range_value_t<OR>,range_reference_t<IR>>uninitialized_copy_result<borrowed_iterator_t<IR>,borrowed_iterator_t<OR>>uninitialized_copy(Ep&&exec,IR&&in_range,OR&&out_range);// freestanding-deletedtemplate<execution-policyEp,random_access_iteratorI,nothrow-random-access-iteratorO,nothrow-sized-sentinel-for<O>S>requiresconstructible_from<iter_value_t<O>,iter_reference_t<I>>uninitialized_copy_n_result<I,O>uninitialized_copy_n(Ep&&exec,Iifirst,// freestanding-deletediter_difference_t<I>n,Oofirst,Solast);}template<classInputIter,classNoThrowForwardIter>constexprNoThrowForwardIteruninitialized_move(InputIterfirst,// freestandingInputIterlast,NoThrowForwardIterresult);template<classExecutionPolicy,classForwardIter,classNoThrowForwardIter>NoThrowForwardIteruninitialized_move(ExecutionPolicy&&exec,// freestanding-deletedForwardIterfirst,ForwardIterlast,NoThrowForwardIterresult);template<classInputIter,classSize,classNoThrowForwardIter>constexprpair<InputIter,NoThrowForwardIter>uninitialized_move_n(InputIterfirst,Sizen,// freestandingNoThrowForwardIterresult);template<classExecutionPolicy,classForwardIter,classSize,classNoThrowForwardIter>pair<ForwardIter,NoThrowForwardIter>uninitialized_move_n(ExecutionPolicy&&exec,// freestanding-deletedForwardIterfirst,Sizen,NoThrowForwardIterresult);namespaceranges{template<classI,classO>usinguninitialized_move_result=in_out_result<I,O>;// freestandingtemplate<input_iteratorI,sentinel_for<I>S1,no-throw-forward-iteratorO,no-throw-sentinel-for<O>S2>requiresconstructible_from<iter_value_t<O>,iter_rvalue_reference_t<I>>constexpruninitialized_move_result<I,O>uninitialized_move(Iifirst,S1ilast,Oofirst,S2olast);// freestandingtemplate<input_rangeIR,no-throw-forward-rangeOR>requiresconstructible_from<range_value_t<OR>,range_rvalue_reference_t<IR>>constexpruninitialized_move_result<borrowed_iterator_t<IR>,borrowed_iterator_t<OR>>uninitialized_move(IR&&in_range,OR&&out_range);// freestandingtemplate<classI,classO>usinguninitialized_move_n_result=in_out_result<I,O>;// freestandingtemplate<input_iteratorI,no-throw-forward-iteratorO,no-throw-sentinel-for<O>S>requiresconstructible_from<iter_value_t<O>,iter_rvalue_reference_t<I>>constexpruninitialized_move_n_result<I,O>uninitialized_move_n(Iifirst,iter_difference_t<I>n,// freestandingOofirst,Solast);template<execution-policyEp,random_access_iteratorI,sized_sentinel_for<I>S1,nothrow-random-access-iteratorO,nothrow-sized-sentinel-for<O>S2>requiresconstructible_from<iter_value_t<O>,iter_rvalue_reference_t<I>>uninitialized_move_result<I,O>uninitialized_move(Ep&&exec,Iifirst,S1ilast,// freestanding-deletedOofirst,S2olast);template<execution-policyEp,sized-random-access-rangeIR,nothrow-sized-random-access-rangeOR>requiresconstructible_from<range_value_t<OR>,range_rvalue_reference_t<IR>>uninitialized_move_result<borrowed_iterator_t<IR>,borrowed_iterator_t<OR>>uninitialized_move(Ep&&exec,IR&&in_range,OR&&out_range);// freestanding-deletedtemplate<execution-policyEp,random_access_iteratorI,nothrow-random-access-iteratorO,nothrow-sized-sentinel-for<O>S>requiresconstructible_from<iter_value_t<O>,iter_rvalue_reference_t<I>>uninitialized_move_n_result<I,O>uninitialized_move_n(Ep&&exec,Iifirst,// freestanding-deletediter_difference_t<I>n,Oofirst,Solast);}template<classNoThrowForwardIter,classT>constexprvoiduninitialized_fill(NoThrowForwardIterfirst,// freestandingNoThrowForwardIterlast,constT&x);template<classExecutionPolicy,classNoThrowForwardIter,classT>voiduninitialized_fill(ExecutionPolicy&&exec,// freestanding-deletedNoThrowForwardIterfirst,NoThrowForwardIterlast,constT&x);template<classNoThrowForwardIter,classSize,classT>constexprNoThrowForwardIteruninitialized_fill_n(NoThrowForwardIterfirst,Sizen,constT&x);// freestandingtemplate<classExecutionPolicy,classNoThrowForwardIter,classSize,classT>NoThrowForwardIteruninitialized_fill_n(ExecutionPolicy&&exec,// freestanding-deletedNoThrowForwardIterfirst,Sizen,constT&x);namespaceranges{template<no-throw-forward-iteratorI,no-throw-sentinel-for<I>S,classT>requiresconstructible_from<iter_value_t<I>,constT&>constexprIuninitialized_fill(Ifirst,Slast,constT&x);// freestandingtemplate<no-throw-forward-rangeR,classT>requiresconstructible_from<range_value_t<R>,constT&>constexprborrowed_iterator_t<R>uninitialized_fill(R&&r,constT&x);// freestandingtemplate<no-throw-forward-iteratorI,classT>requiresconstructible_from<iter_value_t<I>,constT&>constexprIuninitialized_fill_n(Ifirst,// freestandingiter_difference_t<I>n,constT&x);template<execution-policyEp,nothrow-random-access-iteratorI,nothrow-sized-sentinel-for<I>S,classT=iter_value_t<I>>requiresconstructible_from<iter_value_t<I>,constT&>Iuninitialized_fill(Ep&&exec,Ifirst,Slast,constT&x);// freestanding-deletedtemplate<execution-policyEp,nothrow-sized-random-access-rangeR,classT=range_value_t<R>>requiresconstructible_from<range_value_t<R>,constT&>borrowed_iterator_t<R>uninitialized_fill(Ep&&exec,R&&r,// freestanding-deletedconstT&x);template<execution-policyEp,nothrow-random-access-iteratorI,classT=iter_value_t<I>>requiresconstructible_from<iter_value_t<I>,constT&>Iuninitialized_fill_n(Ep&&exec,Ifirst,// freestanding-deletediter_difference_t<I>n,constT&x);}// construct_attemplate<classT,class...Args>constexprT*construct_at(T*location,Args&&...args);// freestandingnamespaceranges{template<classT,class...Args>constexprT*construct_at(T*location,Args&&...args);// freestanding}// destroytemplate<classT>constexprvoiddestroy_at(T*location);// freestandingtemplate<classNoThrowForwardIter>constexprvoiddestroy(NoThrowForwardIterfirst,// freestandingNoThrowForwardIterlast);template<classExecutionPolicy,classNoThrowForwardIter>voiddestroy(ExecutionPolicy&&exec,// freestanding-deletedNoThrowForwardIterfirst,NoThrowForwardIterlast);template<classNoThrowForwardIter,classSize>constexprNoThrowForwardIterdestroy_n(NoThrowForwardIterfirst,// freestandingSizen);template<classExecutionPolicy,classNoThrowForwardIter,classSize>NoThrowForwardIterdestroy_n(ExecutionPolicy&&exec,// freestanding-deletedNoThrowForwardIterfirst,Sizen);namespaceranges{template<destructibleT>constexprvoiddestroy_at(T*location)noexcept;// freestandingtemplate<no-throw-input-iteratorI,no-throw-sentinel-for<I>S>requiresdestructible<iter_value_t<I>>constexprIdestroy(Ifirst,Slast)noexcept;// freestandingtemplate<no-throw-input-rangeR>requiresdestructible<range_value_t<R>>constexprborrowed_iterator_t<R>destroy(R&&r)noexcept;// freestandingtemplate<no-throw-input-iteratorI>requiresdestructible<iter_value_t<I>>constexprIdestroy_n(Ifirst,iter_difference_t<I>n)noexcept;// freestandingtemplate<execution-policyEp,nothrow-random-access-iteratorI,nothrow-sized-sentinel-for<I>S>requiresdestructible<iter_value_t<I>>Idestroy(Ep&&exec,Ifirst,Slast);// freestanding-deletedtemplate<execution-policyEp,nothrow-sized-random-access-rangeR>requiresdestructible<range_value_t<R>>borrowed_iterator_t<R>destroy(Ep&&exec,R&&r);// freestanding-deletedtemplate<execution-policyEp,nothrow-random-access-iteratorI>requiresdestructible<iter_value_t<I>>Idestroy_n(Ep&&exec,Ifirst,iter_difference_t<I>n);// freestanding-deleted}// class template unique_ptrtemplate<classT>structdefault_delete;// freestandingtemplate<classT>structdefault_delete<T[]>;// freestandingtemplate<classT,classD=default_delete<T>>classunique_ptr;// freestandingtemplate<classT,classD>classunique_ptr<T[],D>;// freestandingtemplate<classT,class...Args>constexprunique_ptr<T>make_unique(Args&&...args);// T is not arraytemplate<classT>constexprunique_ptr<T>make_unique(size_tn);// T is U[]template<classT,class...Args>/* unspecified */make_unique(Args&&...)=delete;// T is U[N]template<classT>constexprunique_ptr<T>make_unique_for_overwrite();// T is not arraytemplate<classT>constexprunique_ptr<T>make_unique_for_overwrite(size_tn);// T is U[]template<classT,class...Args>/* unspecified */make_unique_for_overwrite(Args&&...)=delete;// T is U[N]template<classT,classD>constexprvoidswap(unique_ptr<T,D>&x,unique_ptr<T,D>&y)noexcept;// freestandingtemplate<classT1,classD1,classT2,classD2>constexprbooloperator==(constunique_ptr<T1,D1>&x,// freestandingconstunique_ptr<T2,D2>&y);template<classT1,classD1,classT2,classD2>constexprbooloperator<(constunique_ptr<T1,D1>&x,constunique_ptr<T2,D2>&y);// freestandingtemplate<classT1,classD1,classT2,classD2>constexprbooloperator>(constunique_ptr<T1,D1>&x,constunique_ptr<T2,D2>&y);// freestandingtemplate<classT1,classD1,classT2,classD2>constexprbooloperator<=(constunique_ptr<T1,D1>&x,constunique_ptr<T2,D2>&y);// freestandingtemplate<classT1,classD1,classT2,classD2>constexprbooloperator>=(constunique_ptr<T1,D1>&x,constunique_ptr<T2,D2>&y);// freestandingtemplate<classT1,classD1,classT2,classD2>requiresthree_way_comparable_with<typenameunique_ptr<T1,D1>::pointer,typenameunique_ptr<T2,D2>::pointer>constexprcompare_three_way_result_t<typenameunique_ptr<T1,D1>::pointer,typenameunique_ptr<T2,D2>::pointer>operator<=>(constunique_ptr<T1,D1>&x,constunique_ptr<T2,D2>&y);// freestandingtemplate<classT,classD>constexprbooloperator==(constunique_ptr<T,D>&x,nullptr_t)noexcept;// freestandingtemplate<classT,classD>constexprbooloperator<(constunique_ptr<T,D>&x,nullptr_t);// freestandingtemplate<classT,classD>constexprbooloperator<(nullptr_t,constunique_ptr<T,D>&y);// freestandingtemplate<classT,classD>constexprbooloperator>(constunique_ptr<T,D>&x,nullptr_t);// freestandingtemplate<classT,classD>constexprbooloperator>(nullptr_t,constunique_ptr<T,D>&y);// freestandingtemplate<classT,classD>constexprbooloperator<=(constunique_ptr<T,D>&x,nullptr_t);// freestandingtemplate<classT,classD>constexprbooloperator<=(nullptr_t,constunique_ptr<T,D>&y);// freestandingtemplate<classT,classD>constexprbooloperator>=(constunique_ptr<T,D>&x,nullptr_t);// freestandingtemplate<classT,classD>constexprbooloperator>=(nullptr_t,constunique_ptr<T,D>&y);// freestandingtemplate<classT,classD>requiresthree_way_comparable<typenameunique_ptr<T,D>::pointer>constexprcompare_three_way_result_t<typenameunique_ptr<T,D>::pointer>operator<=>(constunique_ptr<T,D>&x,nullptr_t);// freestandingtemplate<classE,classT,classY,classD>basic_ostream<E,T>&operator<<(basic_ostream<E,T>&os,constunique_ptr<Y,D>&p);// class bad_weak_ptrclassbad_weak_ptr;// class template shared_ptrtemplate<classT>classshared_ptr;// shared_ptr creationtemplate<classT,class...Args>constexprshared_ptr<T>make_shared(Args&&...args);// T is not arraytemplate<classT,classA,class...Args>sconstexprhared_ptr<T>allocate_shared(constA&a,Args&&...args);// T is not arraytemplate<classT>constexprshared_ptr<T>make_shared(size_tN);// T is U[]template<classT,classA>constexprshared_ptr<T>allocate_shared(constA&a,size_tN);// T is U[]template<classT>constexprshared_ptr<T>make_shared();// T is U[N]template<classT,classA>constexprshared_ptr<T>allocate_shared(constA&a);// T is U[N]template<classT>constexprshared_ptr<T>make_shared(size_tN,constremove_extent_t<T>&u);// T is U[]template<classT,classA>constexprshared_ptr<T>allocate_shared(constA&a,size_tN,constremove_extent_t<T>&u);// T is U[]template<classT>constexprshared_ptr<T>make_shared(constremove_extent_t<T>&u);// T is U[N]template<classT,classA>constexprshared_ptr<T>allocate_shared(constA&a,constremove_extent_t<T>&u);// T is U[N]template<classT>constexprshared_ptr<T>make_shared_for_overwrite();// T is not U[]template<classT,classA>constexprshared_ptr<T>allocate_shared_for_overwrite(constA&a);// T is not U[]template<classT>constexprshared_ptr<T>make_shared_for_overwrite(size_tN);// T is U[]template<classT,classA>constexprshared_ptr<T>allocate_shared_for_overwrite(constA&a,size_tN);// T is U[]// shared_ptr comparisonstemplate<classT,classU>constexprbooloperator==(constshared_ptr<T>&a,constshared_ptr<U>&b)noexcept;template<classT,classU>constexprstrong_orderingoperator<=>(constshared_ptr<T>&a,constshared_ptr<U>&b)noexcept;template<classT>constexprbooloperator==(constshared_ptr<T>&x,nullptr_t)noexcept;template<classT>constexprstrong_orderingoperator<=>(constshared_ptr<T>&x,nullptr_t)noexcept;// shared_ptr specialized algorithmstemplate<classT>constexprvoidswap(shared_ptr<T>&a,shared_ptr<T>&b)noexcept;// shared_ptr caststemplate<classT,classU>constexprshared_ptr<T>static_pointer_cast(constshared_ptr<U>&r)noexcept;template<classT,classU>constexprshared_ptr<T>static_pointer_cast(shared_ptr<U>&&r)noexcept;template<classT,classU>constexprshared_ptr<T>dynamic_pointer_cast(constshared_ptr<U>&r)noexcept;template<classT,classU>constexprshared_ptr<T>dynamic_pointer_cast(shared_ptr<U>&&r)noexcept;template<classT,classU>constexprshared_ptr<T>const_pointer_cast(constshared_ptr<U>&r)noexcept;template<classT,classU>constexprshared_ptr<T>const_pointer_cast(shared_ptr<U>&&r)noexcept;template<classT,classU>shared_ptr<T>reinterpret_pointer_cast(constshared_ptr<U>&r)noexcept;template<classT,classU>shared_ptr<T>reinterpret_pointer_cast(shared_ptr<U>&&r)noexcept;// shared_ptr get_deletertemplate<classD,classT>constexprD*get_deleter(constshared_ptr<T>&p)noexcept;// shared_ptr I/Otemplate<classE,classT,classY>basic_ostream<E,T>&operator<<(basic_ostream<E,T>&os,constshared_ptr<Y>&p);// class template weak_ptrtemplate<classT>classweak_ptr;// weak_ptr specialized algorithmstemplate<classT>constexprvoidswap(weak_ptr<T>&a,weak_ptr<T>&b)noexcept;// class template owner_lesstemplate<classT=void>structowner_less;// struct owner_hashstructowner_hash;// struct owner_equalstructowner_equal;// class template enable_shared_from_thistemplate<classT>classenable_shared_from_this;// hash supporttemplate<classT>structhash;// freestandingtemplate<classT,classD>structhash<unique_ptr<T,D>>;// freestandingtemplate<classT>structhash<shared_ptr<T>>;// atomic smart pointerstemplate<classT>structatomic;// freestandingtemplate<classT>structatomic<shared_ptr<T>>;template<classT>structatomic<weak_ptr<T>>;// class template out_ptr_ttemplate<classSmart,classPointer,class...Args>classout_ptr_t;// freestanding// function template out_ptrtemplate<classPointer=void,classSmart,class...Args>constexprautoout_ptr(Smart&s,Args&&...args);// freestanding// class template inout_ptr_ttemplate<classSmart,classPointer,class...Args>classinout_ptr_t;// freestanding// function template inout_ptrtemplate<classPointer=void,classSmart,class...Args>constexprautoinout_ptr(Smart&s,Args&&...args);// freestanding// class template indirecttemplate<classT,classAllocator=allocator<T>>classindirect;// hash supporttemplate<classT,classAlloc>structhash<indirect<T,Alloc>>;// class template polymorphictemplate<classT,classAllocator=allocator<T>>classpolymorphic;namespacepmr{template<classT>usingindirect=indirect<T,polymorphic_allocator<T>>;template<classT>usingpolymorphic=polymorphic<T,polymorphic_allocator<T>>;}}
namespace std {class bad_weak_ptr :public exception
{public:// para la especificación de las funciones miembro especialesconstchar* what()constnoexcept override;};}
namespace std {template<class Smart, class Pointer, class... Args>class out_ptr_t
{public:explicit out_ptr_t(Smart&, Args...);
out_ptr_t(const out_ptr_t&)= delete;
~out_ptr_t();
operator Pointer*()constnoexcept;
operator void**()constnoexcept;private:
Smart& s;// solo para exposición
tuple<Args...> a;// solo para exposición
Pointer p;// solo para exposición};}
namespace std {template<class Smart, class Pointer, class... Args>class inout_ptr_t
{public:explicit inout_ptr_t(Smart&, Args...);
inout_ptr_t(const inout_ptr_t&)= delete;
~inout_ptr_t();
operator Pointer*()constnoexcept;
operator void**()constnoexcept;private:
Smart& s;// solo para exposición
tuple<Args...> a;// solo para exposición
Pointer p;// solo para exposición};}
Plantilla de clase
std
::
indirect
namespace std {template<class T, class Allocator = allocator<T>>class indirect
{public:using value_type = T;using allocator_type = Allocator;using pointer =typename allocator_traits<Allocator>::pointer;using const_pointer =typename allocator_traits<Allocator>::const_pointer;// constructoresconstexprexplicit indirect();constexprexplicit indirect(allocator_arg_t, const Allocator& a);constexpr indirect(const indirect& other);constexpr indirect(allocator_arg_t, const Allocator& a, const indirect& other);constexpr indirect(indirect&& other)noexcept;constexpr indirect(allocator_arg_t,
const Allocator& a,
indirect&& other)noexcept(/* ver descripción */);template<class U = T>constexprexplicit indirect(U&& u);template<class U = T>constexprexplicit indirect(allocator_arg_t, const Allocator& a, U&& u);template<class... Nosotros>constexprexplicit indirect(in_place_t, Us&&... us);template<class... Nosotros>constexprexplicit indirect(allocator_arg_t,
const Allocator& a,
in_place_t,
Us&&... us);template<class I, class... Nosotros>constexprexplicit indirect(in_place_t, initializer_list<I> ilist, Us&&... us);template<class I, class... Nosotros>constexprexplicit indirect(allocator_arg_t,
const Allocator& a,
in_place_t,
initializer_list<I> ilist,
Us&&... us);// destructorconstexpr ~indirect();// asignaciónconstexpr indirect& operator=(const indirect& other);constexpr indirect& operator=(indirect&& other)noexcept(/* ver descripción */);template<class U = T>constexpr indirect& operator=(U&& u);// observadoresconstexprconst T& operator*()const&noexcept;constexpr T& operator*()&noexcept;constexprconst T&& operator*()const&&noexcept;constexpr T&& operator*()&&noexcept;constexpr const_pointer operator->()constnoexcept;constexpr pointer operator->()noexcept;constexprbool valueless_after_move()constnoexcept;constexpr allocator_type get_allocator()constnoexcept;// swapconstexprvoid swap(indirect& other)noexcept(/* ver descripción */);friendconstexprvoid swap(indirect& lhs,
indirect& rhs)noexcept(/* ver descripción */);// operadores relacionalestemplate<class U, class AA>friendconstexprbool operator==(const indirect& lhs,
const indirect<U, AA>& rhs)noexcept(/* ver descripción */);template<class U, class AA>friendconstexprauto operator<=>(const indirect& lhs, const indirect<U, AA>& rhs)->/*synth-three-way-result*/<T, U>;// comparación con Ttemplate<class U>friendconstexprbool operator==(const indirect& lhs,
const U& rhs)noexcept(/* ver descripción */);template<class U>friendconstexprauto operator<=>(const indirect& lhs, const U& rhs)->/*synth-three-way-result*/<T, U>;private:
pointer /*p*/;// exposición-solamente
Allocator /*alloc*/= Allocator();// exposición-solamente};template<class Value>
indirect(Value)-> indirect<Value>;template<class Allocator, class Value>
indirect(allocator_arg_t, Allocator, Value)-> indirect<Value,
typename allocator_traits<Allocator>::template rebind_alloc<Value>>;}
Plantilla de clase
std
::
polymorphic
namespace std {template<class T, class Allocator = allocator<T>>class polymorphic
{public:using value_type = T;using allocator_type = Allocator;using pointer =typename allocator_traits<Allocator>::pointer;using const_pointer =typename allocator_traits<Allocator>::const_pointer;// constructoresconstexprexplicit polymorphic();constexprexplicit polymorphic(allocator_arg_t, const Allocator& a);constexpr polymorphic(const polymorphic& other);constexpr polymorphic(allocator_arg_t, const Allocator& a, const polymorphic& other);constexpr polymorphic(polymorphic&& other)noexcept;constexpr polymorphic(allocator_arg_t,
const Allocator& a,
polymorphic&& other)noexcept(/* ver descripción */);template<class U = T>constexprexplicit polymorphic(U&& u);template<class U = T>constexprexplicit polymorphic(allocator_arg_t, const Allocator& a, U&& u);template<class U, class... Ts>constexprexplicit polymorphic(in_place_type_t<U>, Ts&&... ts);template<class U, class... Ts>constexprexplicit polymorphic(allocator_arg_t,
const Allocator& a,
in_place_type_t<U>,
Ts&&... ts);template<class U, class I, class... Us>constexprexplicit polymorphic(in_place_type_t<U>,
initializer_list<I> ilist,
Us&&... us);template<class U, class I, class... Us>constexprexplicit polymorphic(allocator_arg_t,
const Allocator& a,
in_place_type_t<U>,
initializer_list<I> ilist,
Us&&... us);// destructorconstexpr ~polymorphic();// asignaciónconstexpr polymorphic& operator=(const polymorphic& other);constexpr polymorphic& operator=(polymorphic&& other)noexcept(/* ver descripción */);// observadoresconstexprconst T& operator*()constnoexcept;constexpr T& operator*()noexcept;constexpr const_pointer operator->()constnoexcept;constexpr pointer operator->()noexcept;constexprbool valueless_after_move()constnoexcept;constexpr allocator_type get_allocator()constnoexcept;// intercambioconstexprvoid swap(polymorphic& other)noexcept(/* ver descripción */);friendconstexprvoid swap(polymorphic& lhs,
polymorphic& rhs)noexcept(/* ver descripción */);private:
Allocator /*alloc*/= Allocator();// solo para exposición};}