interagit avec les définisseurs de pointeurs étrangers, obtient la valeur initiale du pointeur depuis un pointeur intelligent et le réinitialise lors de la destruction
(modèle de classe)
construit des objets par initialisation par défaut dans une zone mémoire non initialisée, définie par une plage (modèle de fonction & objet fonction d'algorithme)
construit des objets par initialisation par défaut dans une zone mémoire non initialisée, définie par un début et un compte (modèle de fonction & objet fonction d'algorithme)
construit des objets par initialisation par valeur dans une zone mémoire non initialisée, définie par une plage (modèle de fonction & objet fonction d'algorithme)
construit des objets par initialisation par valeur dans une zone mémoire non initialisée, définie par un début et un compte (modèle de fonction & objet fonction d'algorithme)
spécialise les opérations atomiques pour std::shared_ptr (modèle de fonction)
Synopsis
#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>>;}}
Le code C++ reste inchangé comme demandé, car il se trouve dans des balises `
` et contient des termes spécifiques au C++ qui ne doivent pas être traduits. Seul le texte en dehors des balises de code aurait été traduit, mais dans ce cas, il n'y a pas de texte supplémentaire à traduire.
namespace std {class bad_weak_ptr :public exception
{public:// pour la spécification des fonctions membres spécialesconstchar* what()constnoexcept override;};}