[memory.syn]

# 20 Memory management library [[mem]](./#mem)

## 20.2 Memory [[memory]](memory#syn)

### 20.2.2 Header <memory> synopsis [memory.syn]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L33)

The header <memory> defines several types and function templates that
describe properties of pointers and pointer-like types, manage memory
for containers and other template types, destroy objects, and
construct objects in
uninitialized memory
buffers ([[pointer.traits]](pointer.traits "20.2.3 Pointer traits")â[[specialized.addressof]](specialized.addressof "20.2.11 addressof") and [[specialized.algorithms]](specialized.algorithms "26.11 Specialized <memory> algorithms"))[.](#1.sentence-1)

The header also defines the templatesunique_ptr, shared_ptr, weak_ptr,out_ptr_t, inout_ptr_t, and various function
templates that operate on objects of these types ([[smartptr]](smartptr "20.3 Smart pointers"))[.](#1.sentence-2)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L45)

Let *POINTER_OF*(T) denote a type that is

- [(2.1)](#2.1)

T​::​pointer if the [*qualified-id*](expr.prim.id.qual#nt:qualified-id "7.5.5.3 Qualified names [expr.prim.id.qual]") T​::​pointer is valid and denotes a type,

- [(2.2)](#2.2)

otherwise, T​::​element_type* if the [*qualified-id*](expr.prim.id.qual#nt:qualified-id "7.5.5.3 Qualified names [expr.prim.id.qual]") T​::​element_type is valid and denotes a type,

- [(2.3)](#2.3)

otherwise, pointer_traits<T>​::​element_type*[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L59)

Let *POINTER_OF_OR*(T, U) denote a type that is:

- [(3.1)](#3.1)

*POINTER_OF*(T) if *POINTER_OF*(T) is valid and denotes a type,

- [(3.2)](#3.2)

otherwise, U[.](#3.sentence-1)

#include <compare> // see [[compare.syn]](compare.syn "17.12.1 Header <compare> synopsis")namespace std {// [[pointer.traits]](pointer.traits "20.2.3 Pointer traits"), pointer traitstemplate<class Ptr> struct pointer_traits; // freestandingtemplate<class T> struct pointer_traits<T*>; // freestanding// [[pointer.conversion]](pointer.conversion "20.2.4 Pointer conversion"), pointer conversiontemplate<class T>constexpr T* to_address(T* p) noexcept; // freestandingtemplate<class Ptr>constexpr auto to_address(const Ptr& p) noexcept; // freestanding// [[ptr.align]](ptr.align "20.2.5 Pointer alignment"), pointer alignmentvoid* align(size_t alignment, size_t size, void*& ptr, size_t& space); // freestandingtemplate<size_t N, class T>constexpr T* assume_aligned(T* ptr); // freestandingtemplate<size_t Alignment, class T>bool is_sufficiently_aligned(T* ptr); // [[obj.lifetime]](obj.lifetime "20.2.6 Explicit lifetime management"), explicit lifetime managementtemplate<class T> T* start_lifetime_as(void* p) noexcept; // freestandingtemplate<class T>const T* start_lifetime_as(const void* p) noexcept; // freestandingtemplate<class T>volatile T* start_lifetime_as(volatile void* p) noexcept; // freestandingtemplate<class T>const volatile T* start_lifetime_as(const volatile void* p) noexcept; // freestandingtemplate<class T> T* start_lifetime_as_array(void* p, size_t n) noexcept; // freestandingtemplate<class T>const T* start_lifetime_as_array(const void* p, size_t n) noexcept; // freestandingtemplate<class T>volatile T* start_lifetime_as_array(volatile void* p, size_t n) noexcept; // freestandingtemplate<class T>const volatile T* start_lifetime_as_array(const volatile void* p, // freestanding size_t n) noexcept; template<class T> T* trivially_relocate(T* first, T* last, T* result); // freestandingtemplate<class T>constexpr T* relocate(T* first, T* last, T* result); // freestanding// [[allocator.tag]](allocator.tag "20.2.7 Allocator argument tag"), allocator argument tagstruct allocator_arg_t { explicit allocator_arg_t() = default; }; // freestandinginline constexpr allocator_arg_t allocator_arg{}; // freestanding// [[allocator.uses]](allocator.uses "20.2.8 uses_­allocator"), uses_allocatortemplate<class T, class Alloc> struct uses_allocator; // freestanding// [[allocator.uses.trait]](allocator.uses.trait "20.2.8.1 uses_­allocator trait"), uses_allocatortemplate<class T, class Alloc>constexpr bool [uses_allocator_v](#lib:uses_allocator_v "20.2.2 Header <memory> synopsis [memory.syn]") = uses_allocator<T, Alloc>::value; // freestanding// [[allocator.uses.construction]](allocator.uses.construction "20.2.8.2 Uses-allocator construction"), uses-allocator constructiontemplate<class T, class Alloc, class... Args>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding Args&&... args) noexcept; template<class T, class Alloc, class Tuple1, class Tuple2>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding piecewise_construct_t,
 Tuple1&& x, Tuple2&& y) noexcept; template<class T, class Alloc>constexpr auto uses_allocator_construction_args(const Alloc& alloc) noexcept; // freestandingtemplate<class T, class Alloc, class U, class V>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding U&& u, V&& v) noexcept; template<class T, class Alloc, class U, class V>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding pair<U, V>& pr) noexcept; template<class T, class Alloc, class U, class V>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestandingconst pair<U, V>& pr) noexcept; template<class T, class Alloc, class U, class V>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding pair<U, V>&& pr) noexcept; template<class T, class Alloc, class U, class V>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestandingconst pair<U, V>&& pr) noexcept; template<class T, class Alloc, [*pair-like*](tuple.syn#concept:pair-like "22.4.2 Header <tuple> synopsis [tuple.syn]") P>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding P&& p) noexcept; template<class T, class Alloc, class U>constexpr auto uses_allocator_construction_args(const Alloc& alloc, // freestanding U&& u) noexcept; template<class T, class Alloc, class... Args>constexpr T make_obj_using_allocator(const Alloc& alloc, Args&&... args); // freestandingtemplate<class T, class Alloc, class... Args>constexpr T* uninitialized_construct_using_allocator(T* p, // freestandingconst Alloc& alloc, Args&&... args); // [[allocator.traits]](allocator.traits "20.2.9 Allocator traits"), allocator traitstemplate<class Alloc> struct allocator_traits; // freestandingtemplate<class Pointer, class SizeType = size_t>struct allocation_result { // freestanding Pointer ptr;
 SizeType count; }; // [[default.allocator]](default.allocator "20.2.10 The default allocator"), the default allocatortemplate<class T> class allocator; template<class T, class U>constexpr bool operator==(const allocator<T>&, const allocator<U>&) noexcept; // [[specialized.addressof]](specialized.addressof "20.2.11 addressof"), addressoftemplate<class T>constexpr T* addressof(T& r) noexcept; // freestandingtemplate<class T>const T* addressof(const T&&) = delete; // freestanding// [[specialized.algorithms]](specialized.algorithms "26.11 Specialized <memory> algorithms"), specialized algorithms// [[special.mem.concepts]](special.mem.concepts "26.11.2 Special memory concepts"), special memory conceptstemplate<class I>concept [*nothrow-input-iterator*](special.mem.concepts#concept:nothrow-input-iterator "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class I>concept [*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class I>concept [*nothrow-bidirectional-iterator*](special.mem.concepts#concept:nothrow-bidirectional-iterator "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class I>concept [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class S, class I>concept [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class S, class I>concept [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class R>concept [*nothrow-input-range*](special.mem.concepts#concept:nothrow-input-range "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class R>concept [*nothrow-forward-range*](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class R>concept [*nothrow-bidirectional-range*](special.mem.concepts#concept:nothrow-bidirectional-range "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class R>concept [*nothrow-random-access-range*](special.mem.concepts#concept:nothrow-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class R>concept [*nothrow-sized-random-access-range*](special.mem.concepts#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") = *see below*; // *exposition only*template<class NoThrowForwardIterator>constexpr void uninitialized_default_construct(NoThrowForwardIterator first, // freestanding NoThrowForwardIterator last); template<class ExecutionPolicy, class NoThrowForwardIterator>void uninitialized_default_construct(ExecutionPolicy&& exec, // freestanding-deleted, NoThrowForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") NoThrowForwardIterator last); template<class NoThrowForwardIterator, class Size>constexpr NoThrowForwardIterator
 uninitialized_default_construct_n(NoThrowForwardIterator first, Size n); // freestandingtemplate<class ExecutionPolicy, class NoThrowForwardIterator, class Size> NoThrowForwardIterator
 uninitialized_default_construct_n(ExecutionPolicy&& exec, // freestanding-deleted, NoThrowForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") Size n); namespace ranges {template<[*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<iter_value_t<I>>constexpr I uninitialized_default_construct(I first, S last); // freestandingtemplate<[*nothrow-forward-range*](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") R>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<range_value_t<R>>constexpr borrowed_iterator_t<R> uninitialized_default_construct(R&& r); // freestandingtemplate<[*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<iter_value_t<I>>constexpr I uninitialized_default_construct_n(I first, // freestanding iter_difference_t<I> n); template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<iter_value_t<I>> I uninitialized_default_construct(Ep&& exec, I first, S last); // freestanding-deleted,// see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-sized-random-access-range*](special.mem.concepts#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") R>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<range_value_t<R>> borrowed_iterator_t<R> uninitialized_default_construct(Ep&& exec, // freestanding-deleted, R&& r); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<iter_value_t<I>> I uninitialized_default_construct_n(Ep&& exec, I first, // freestanding-deleted, iter_difference_t<I> n); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")}template<class NoThrowForwardIterator>constexpr void uninitialized_value_construct(NoThrowForwardIterator first, // freestanding NoThrowForwardIterator last); template<class ExecutionPolicy, class NoThrowForwardIterator>void uninitialized_value_construct(ExecutionPolicy&& exec, // freestanding-deleted, NoThrowForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") NoThrowForwardIterator last); template<class NoThrowForwardIterator, class Size>constexpr NoThrowForwardIterator
 uninitialized_value_construct_n(NoThrowForwardIterator first, Size n); // freestandingtemplate<class ExecutionPolicy, class NoThrowForwardIterator, class Size> NoThrowForwardIterator
 uninitialized_value_construct_n(ExecutionPolicy&& exec, // freestanding-deleted, NoThrowForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") Size n); namespace ranges {template<[*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<iter_value_t<I>>constexpr I uninitialized_value_construct(I first, S last); // freestandingtemplate<[*nothrow-forward-range*](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") R>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<range_value_t<R>>constexpr borrowed_iterator_t<R> uninitialized_value_construct(R&& r); // freestandingtemplate<[*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<iter_value_t<I>>constexpr I uninitialized_value_construct_n(I first, // freestanding iter_difference_t<I> n); template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<iter_value_t<I>> I uninitialized_value_construct(Ep&& exec, I first, S last); // freestanding-deleted,// see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-sized-random-access-range*](special.mem.concepts#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") R>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<range_value_t<R>> borrowed_iterator_t<R> uninitialized_value_construct(Ep&& exec, // freestanding-deleted, R&& r); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I>requires [default_initializable](concept.default.init#concept:default_initializable "18.4.12 Concept default_­initializable [concept.default.init]")<iter_value_t<I>> I uninitialized_value_construct_n(Ep&& exec, I first, // freestanding-deleted, iter_difference_t<I> n); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")}template<class InputIterator, class NoThrowForwardIterator>constexpr NoThrowForwardIterator uninitialized_copy(InputIterator first, // freestanding InputIterator last,
 NoThrowForwardIterator result); template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator> NoThrowForwardIterator uninitialized_copy(ExecutionPolicy&& exec, // freestanding-deleted, ForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") ForwardIterator last,
 NoThrowForwardIterator result); template<class InputIterator, class Size, class NoThrowForwardIterator>constexpr NoThrowForwardIterator uninitialized_copy_n(InputIterator first, // freestanding Size n,
 NoThrowForwardIterator result); template<class ExecutionPolicy, class ForwardIterator, class Size, class NoThrowForwardIterator> NoThrowForwardIterator uninitialized_copy_n(ExecutionPolicy&& exec, // freestanding-deleted, ForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") Size n,
 NoThrowForwardIterator result); namespace ranges {template<class I, class O>using [uninitialized_copy_result](#lib:uninitialized_copy_result "20.2.2 Header <memory> synopsis [memory.syn]") = in_out_result<I, O>; // freestandingtemplate<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_­iterator [iterator.concept.input]") I, [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_­for [iterator.concept.sentinel]")<I> S1, [*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S2>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<O>, iter_reference_t<I>>constexpr uninitialized_copy_result<I, O> uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); // freestandingtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") IR, [*nothrow-forward-range*](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") OR>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<range_value_t<OR>, range_reference_t<IR>>constexpr uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>> uninitialized_copy(IR&& in_range, OR&& out_range); // freestandingtemplate<class I, class O>using [uninitialized_copy_n_result](#lib:uninitialized_copy_n_result "20.2.2 Header <memory> synopsis [memory.syn]") = in_out_result<I, O>; // freestandingtemplate<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_­iterator [iterator.concept.input]") I, [*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<O>, iter_reference_t<I>>constexpr uninitialized_copy_n_result<I, O> uninitialized_copy_n(I ifirst, iter_difference_t<I> n, // freestanding O ofirst, S olast); template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [random_access_iterator](iterator.concept.random.access#concept:random_access_iterator "24.3.4.13 Concept random_­access_­iterator [iterator.concept.random.access]") I, [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<I> S1, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S2>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O> uninitialized_copy(Ep&& exec, I ifirst, S1 ilast, // freestanding-deleted, O ofirst, S2 olast); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*sized-random-access-range*](range.refinements#concept:sized-random-access-range "25.4.6 Other range refinements [range.refinements]") IR, [*nothrow-sized-random-access-range*](special.mem.concepts#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") OR>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<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-deleted,// see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [random_access_iterator](iterator.concept.random.access#concept:random_access_iterator "24.3.4.13 Concept random_­access_­iterator [iterator.concept.random.access]") I, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_n_result<I, O> uninitialized_copy_n(Ep&& exec, I ifirst, iter_difference_t<I> n, // freestanding-deleted, O ofirst, S olast); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")}template<class InputIterator, class NoThrowForwardIterator>constexpr NoThrowForwardIterator uninitialized_move(InputIterator first, // freestanding InputIterator last,
 NoThrowForwardIterator result); template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator> NoThrowForwardIterator uninitialized_move(ExecutionPolicy&& exec, // freestanding-deleted, ForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") ForwardIterator last,
 NoThrowForwardIterator result); template<class InputIterator, class Size, class NoThrowForwardIterator>constexpr pair<InputIterator, NoThrowForwardIterator> uninitialized_move_n(InputIterator first, Size n, // freestanding NoThrowForwardIterator result); template<class ExecutionPolicy, class ForwardIterator, class Size, class NoThrowForwardIterator> pair<ForwardIterator, NoThrowForwardIterator> uninitialized_move_n(ExecutionPolicy&& exec, // freestanding-deleted, ForwardIterator first, Size n, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") NoThrowForwardIterator result); namespace ranges {template<class I, class O>using [uninitialized_move_result](#lib:uninitialized_move_result "20.2.2 Header <memory> synopsis [memory.syn]") = in_out_result<I, O>; // freestandingtemplate<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_­iterator [iterator.concept.input]") I, [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_­for [iterator.concept.sentinel]")<I> S1, [*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S2>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<O>, iter_rvalue_reference_t<I>>constexpr uninitialized_move_result<I, O> uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); // freestandingtemplate<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") IR, [*nothrow-forward-range*](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") OR>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<range_value_t<OR>, range_rvalue_reference_t<IR>>constexpr uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>> uninitialized_move(IR&& in_range, OR&& out_range); // freestandingtemplate<class I, class O>using [uninitialized_move_n_result](#lib:uninitialized_move_n_result "20.2.2 Header <memory> synopsis [memory.syn]") = in_out_result<I, O>; // freestandingtemplate<[input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_­iterator [iterator.concept.input]") I, [*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<O>, iter_rvalue_reference_t<I>>constexpr uninitialized_move_n_result<I, O> uninitialized_move_n(I ifirst, iter_difference_t<I> n, // freestanding O ofirst, S olast); template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [random_access_iterator](iterator.concept.random.access#concept:random_access_iterator "24.3.4.13 Concept random_­access_­iterator [iterator.concept.random.access]") I, [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<I> S1, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S2>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O> uninitialized_move(Ep&& exec, I ifirst, S1 ilast, // freestanding-deleted, O ofirst, S2 olast); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*sized-random-access-range*](range.refinements#concept:sized-random-access-range "25.4.6 Other range refinements [range.refinements]") IR, [*nothrow-sized-random-access-range*](special.mem.concepts#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") OR>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<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-deleted,// see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [random_access_iterator](iterator.concept.random.access#concept:random_access_iterator "24.3.4.13 Concept random_­access_­iterator [iterator.concept.random.access]") I, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") O, [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<O> S>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_n_result<I, O> uninitialized_move_n(Ep&& exec, I ifirst, iter_difference_t<I> n, // freestanding-deleted, O ofirst, S olast); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")}template<class NoThrowForwardIterator, class T>constexpr void uninitialized_fill(NoThrowForwardIterator first, // freestanding NoThrowForwardIterator last, const T& x); template<class ExecutionPolicy, class NoThrowForwardIterator, class T>void uninitialized_fill(ExecutionPolicy&& exec, // freestanding-deleted, NoThrowForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") NoThrowForwardIterator last, const T& x); template<class NoThrowForwardIterator, class Size, class T>constexpr NoThrowForwardIterator
 uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x); // freestandingtemplate<class ExecutionPolicy, class NoThrowForwardIterator, class Size, class T> NoThrowForwardIterator
 uninitialized_fill_n(ExecutionPolicy&& exec, // freestanding-deleted, NoThrowForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") Size n, const T& x); namespace ranges {template<[*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S, class T>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<I>, const T&>constexpr I uninitialized_fill(I first, S last, const T& x); // freestandingtemplate<[*nothrow-forward-range*](special.mem.concepts#concept:nothrow-forward-range "26.11.2 Special memory concepts [special.mem.concepts]") R, class T>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<range_value_t<R>, const T&>constexpr borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x); // freestandingtemplate<[*nothrow-forward-iterator*](special.mem.concepts#concept:nothrow-forward-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, class T>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<I>, const T&>constexpr I uninitialized_fill_n(I first, // freestanding iter_difference_t<I> n, const T& x); template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S, class T>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<I>, const T&> I uninitialized_fill(Ep&& exec, I first, S last, const T& x); // freestanding-deleted,// see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-sized-random-access-range*](special.mem.concepts#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") R, class T>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<range_value_t<R>, const T&> borrowed_iterator_t<R> uninitialized_fill(Ep&& exec, R&& r, // freestanding-deleted,const T& x); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, class T>requires [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]")<iter_value_t<I>, const T&> I uninitialized_fill_n(Ep&& exec, I first, // freestanding-deleted, iter_difference_t<I> n, const T& x); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")}// [[specialized.construct]](specialized.construct "26.11.8 construct_­at"), construct_attemplate<class T, class... Args>constexpr T* construct_at(T* location, Args&&... args); // freestandingnamespace ranges {template<class T, class... Args>constexpr T* construct_at(T* location, Args&&... args); // freestanding}// [[specialized.destroy]](specialized.destroy "26.11.9 destroy"), destroytemplate<class T>constexpr void destroy_at(T* location); // freestandingtemplate<class NoThrowForwardIterator>constexpr void destroy(NoThrowForwardIterator first, // freestanding NoThrowForwardIterator last); template<class ExecutionPolicy, class NoThrowForwardIterator>void destroy(ExecutionPolicy&& exec, // freestanding-deleted, NoThrowForwardIterator first, // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads") NoThrowForwardIterator last); template<class NoThrowForwardIterator, class Size>constexpr NoThrowForwardIterator destroy_n(NoThrowForwardIterator first, // freestanding Size n); template<class ExecutionPolicy, class NoThrowForwardIterator, class Size> NoThrowForwardIterator destroy_n(ExecutionPolicy&& exec, // freestanding-deleted, NoThrowForwardIterator first, Size n); // see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")namespace ranges {template<[destructible](concept.destructible#concept:destructible "18.4.10 Concept destructible [concept.destructible]") T>constexpr void destroy_at(T* location) noexcept; // freestandingtemplate<[*nothrow-input-iterator*](special.mem.concepts#concept:nothrow-input-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [*nothrow-sentinel-for*](special.mem.concepts#concept:nothrow-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S>requires [destructible](concept.destructible#concept:destructible "18.4.10 Concept destructible [concept.destructible]")<iter_value_t<I>>constexpr I destroy(I first, S last) noexcept; // freestandingtemplate<[*nothrow-input-range*](special.mem.concepts#concept:nothrow-input-range "26.11.2 Special memory concepts [special.mem.concepts]") R>requires [destructible](concept.destructible#concept:destructible "18.4.10 Concept destructible [concept.destructible]")<range_value_t<R>>constexpr borrowed_iterator_t<R> destroy(R&& r) noexcept; // freestandingtemplate<[*nothrow-input-iterator*](special.mem.concepts#concept:nothrow-input-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I>requires [destructible](concept.destructible#concept:destructible "18.4.10 Concept destructible [concept.destructible]")<iter_value_t<I>>constexpr I destroy_n(I first, iter_difference_t<I> n) noexcept; // freestandingtemplate<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I, [*nothrow-sized-sentinel-for*](special.mem.concepts#concept:nothrow-sized-sentinel-for "26.11.2 Special memory concepts [special.mem.concepts]")<I> S>requires [destructible](concept.destructible#concept:destructible "18.4.10 Concept destructible [concept.destructible]")<iter_value_t<I>> I destroy(Ep&& exec, I first, S last) noexcept; // freestanding-deleted,// see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-sized-random-access-range*](special.mem.concepts#concept:nothrow-sized-random-access-range "26.11.2 Special memory concepts [special.mem.concepts]") R>requires [destructible](concept.destructible#concept:destructible "18.4.10 Concept destructible [concept.destructible]")<range_value_t<R>> borrowed_iterator_t<R> destroy(Ep&& exec, R&& r) noexcept; // freestanding-deleted,// see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")template<[*execution-policy*](algorithms.parallel.defns#concept:execution-policy "26.3.1 Preamble [algorithms.parallel.defns]") Ep, [*nothrow-random-access-iterator*](special.mem.concepts#concept:nothrow-random-access-iterator "26.11.2 Special memory concepts [special.mem.concepts]") I>requires [destructible](concept.destructible#concept:destructible "18.4.10 Concept destructible [concept.destructible]")<iter_value_t<I>> I destroy_n(Ep&& exec, I first, iter_difference_t<I> n) noexcept; // freestanding-deleted,// see [[algorithms.parallel.overloads]](algorithms.parallel.overloads "26.3.5 Parallel algorithm overloads")}// [[unique.ptr]](unique.ptr "20.3.1 Unique-ownership pointers"), class template unique_ptrtemplate<class T> struct default_delete; // freestandingtemplate<class T> struct default_delete<T[]>; // freestandingtemplate<class T, class D = default_delete<T>> class unique_ptr; // freestandingtemplate<class T, class D> class unique_ptr<T[], D>; // freestandingtemplate<class T, class... Args>constexpr unique_ptr<T> make_unique(Args&&... args); // T is not arraytemplate<class T>constexpr unique_ptr<T> make_unique(size_t n); // T is U[]template<class T, class... Args>*unspecified* make_unique(Args&&...) = delete; // T is U[N]template<class T>constexpr unique_ptr<T> make_unique_for_overwrite(); // T is not arraytemplate<class T>constexpr unique_ptr<T> make_unique_for_overwrite(size_t n); // T is U[]template<class T, class... Args>*unspecified* make_unique_for_overwrite(Args&&...) = delete; // T is U[N]template<class T, class D>constexpr void swap(unique_ptr<T, D>& x, unique_ptr<T, D>& y) noexcept; // freestandingtemplate<class T1, class D1, class T2, class D2>constexpr bool operator==(const unique_ptr<T1, D1>& x, // freestandingconst unique_ptr<T2, D2>& y); template<class T1, class D1, class T2, class D2>constexpr bool operator<(const unique_ptr<T1, D1>& x, // freestandingconst unique_ptr<T2, D2>& y); template<class T1, class D1, class T2, class D2>constexpr bool operator>(const unique_ptr<T1, D1>& x, // freestandingconst unique_ptr<T2, D2>& y); template<class T1, class D1, class T2, class D2>constexpr bool operator<=(const unique_ptr<T1, D1>& x, // freestandingconst unique_ptr<T2, D2>& y); template<class T1, class D1, class T2, class D2>constexpr bool operator>=(const unique_ptr<T1, D1>& x, // freestandingconst unique_ptr<T2, D2>& y); template<class T1, class D1, class T2, class D2>requires [three_way_comparable_with](cmp.concept#concept:three_way_comparable_with "17.12.4 Concept three_­way_­comparable [cmp.concept]")<typename unique_ptr<T1, D1>::pointer, typename unique_ptr<T2, D2>::pointer>constexpr compare_three_way_result_t<typename unique_ptr<T1, D1>::pointer, typename unique_ptr<T2, D2>::pointer>operator<=>(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y); // freestandingtemplate<class T, class D>constexpr bool operator==(const unique_ptr<T, D>& x, nullptr_t) noexcept; // freestandingtemplate<class T, class D>constexpr bool operator<(const unique_ptr<T, D>& x, nullptr_t); // freestandingtemplate<class T, class D>constexpr bool operator<(nullptr_t, const unique_ptr<T, D>& y); // freestandingtemplate<class T, class D>constexpr bool operator>(const unique_ptr<T, D>& x, nullptr_t); // freestandingtemplate<class T, class D>constexpr bool operator>(nullptr_t, const unique_ptr<T, D>& y); // freestandingtemplate<class T, class D>constexpr bool operator<=(const unique_ptr<T, D>& x, nullptr_t); // freestandingtemplate<class T, class D>constexpr bool operator<=(nullptr_t, const unique_ptr<T, D>& y); // freestandingtemplate<class T, class D>constexpr bool operator>=(const unique_ptr<T, D>& x, nullptr_t); // freestandingtemplate<class T, class D>constexpr bool operator>=(nullptr_t, const unique_ptr<T, D>& y); // freestandingtemplate<class T, class D>requires [three_way_comparable](cmp.concept#concept:three_way_comparable "17.12.4 Concept three_­way_­comparable [cmp.concept]")<typename unique_ptr<T, D>::pointer>constexpr compare_three_way_result_t<typename unique_ptr<T, D>::pointer>operator<=>(const unique_ptr<T, D>& x, nullptr_t); // freestandingtemplate<class E, class T, class Y, class D> basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os, const unique_ptr<Y, D>& p); // [[util.smartptr.weak.bad]](util.smartptr.weak.bad "20.3.2.1 Class bad_­weak_­ptr"), class bad_weak_ptrclass bad_weak_ptr; // [[util.smartptr.shared]](util.smartptr.shared "20.3.2.2 Class template shared_­ptr"), class template shared_ptrtemplate<class T> class shared_ptr; // [[util.smartptr.shared.create]](util.smartptr.shared.create "20.3.2.2.7 Creation"), shared_ptr creationtemplate<class T, class... Args>constexpr shared_ptr<T> make_shared(Args&&... args); // T is not arraytemplate<class T, class A, class... Args>constexpr shared_ptr<T> allocate_shared(const A& a, Args&&... args); // T is not arraytemplate<class T>constexpr shared_ptr<T> make_shared(size_t N); // T is U[]template<class T, class A>constexpr shared_ptr<T> allocate_shared(const A& a, size_t N); // T is U[]template<class T>constexpr shared_ptr<T> make_shared(); // T is U[N]template<class T, class A>constexpr shared_ptr<T> allocate_shared(const A& a); // T is U[N]template<class T>constexpr shared_ptr<T> make_shared(size_t N, const remove_extent_t<T>& u); // T is U[]template<class T, class A>constexpr shared_ptr<T> allocate_shared(const A& a, size_t N, const remove_extent_t<T>& u); // T is U[]template<class T>constexpr shared_ptr<T> make_shared(const remove_extent_t<T>& u); // T is U[N]template<class T, class A>constexpr shared_ptr<T> allocate_shared(const A& a, // T is U[N]const remove_extent_t<T>& u); template<class T>constexpr shared_ptr<T> make_shared_for_overwrite(); // T is not U[]template<class T, class A>constexpr shared_ptr<T> allocate_shared_for_overwrite(const A& a); // T is not U[]template<class T>constexpr shared_ptr<T> make_shared_for_overwrite(size_t N); // T is U[]template<class T, class A>constexpr shared_ptr<T> allocate_shared_for_overwrite(const A& a, size_t N); // T is U[]// [[util.smartptr.shared.cmp]](util.smartptr.shared.cmp "20.3.2.2.8 Comparison"), shared_ptr comparisonstemplate<class T, class U>constexpr bool operator==(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept; template<class T, class U>constexpr strong_ordering operator<=>(const shared_ptr<T>& a, const shared_ptr<U>& b) noexcept; template<class T>constexpr bool operator==(const shared_ptr<T>& x, nullptr_t) noexcept; template<class T>constexpr strong_ordering operator<=>(const shared_ptr<T>& x, nullptr_t) noexcept; // [[util.smartptr.shared.spec]](util.smartptr.shared.spec "20.3.2.2.9 Specialized algorithms"), shared_ptr specialized algorithmstemplate<class T>constexpr void swap(shared_ptr<T>& a, shared_ptr<T>& b) noexcept; // [[util.smartptr.shared.cast]](util.smartptr.shared.cast "20.3.2.2.10 Casts"), shared_ptr caststemplate<class T, class U>constexpr shared_ptr<T> static_pointer_cast(const shared_ptr<U>& r) noexcept; template<class T, class U>constexpr shared_ptr<T> static_pointer_cast(shared_ptr<U>&& r) noexcept; template<class T, class U>constexpr shared_ptr<T> dynamic_pointer_cast(const shared_ptr<U>& r) noexcept; template<class T, class U>constexpr shared_ptr<T> dynamic_pointer_cast(shared_ptr<U>&& r) noexcept; template<class T, class U>constexpr shared_ptr<T> const_pointer_cast(const shared_ptr<U>& r) noexcept; template<class T, class U>constexpr shared_ptr<T> const_pointer_cast(shared_ptr<U>&& r) noexcept; template<class T, class U> shared_ptr<T> reinterpret_pointer_cast(const shared_ptr<U>& r) noexcept; template<class T, class U> shared_ptr<T> reinterpret_pointer_cast(shared_ptr<U>&& r) noexcept; // [[util.smartptr.getdeleter]](util.smartptr.getdeleter "20.3.2.2.11 get_­deleter"), shared_ptr get_deletertemplate<class D, class T>constexpr D* get_deleter(const shared_ptr<T>& p) noexcept; // [[util.smartptr.shared.io]](util.smartptr.shared.io "20.3.2.2.12 I/O"), shared_ptr I/Otemplate<class E, class T, class Y> basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os, const shared_ptr<Y>& p); // [[util.smartptr.weak]](util.smartptr.weak "20.3.2.3 Class template weak_­ptr"), class template weak_ptrtemplate<class T> class weak_ptr; // [[util.smartptr.weak.spec]](util.smartptr.weak.spec "20.3.2.3.7 Specialized algorithms"), weak_ptr specialized algorithmstemplate<class T> constexpr void swap(weak_ptr<T>& a, weak_ptr<T>& b) noexcept; // [[util.smartptr.ownerless]](util.smartptr.ownerless "20.3.2.4 Class template owner_­less"), class template owner_lesstemplate<class T = void> struct owner_less; // [[util.smartptr.owner.hash]](util.smartptr.owner.hash "20.3.2.5 Struct owner_­hash"), struct owner_hashstruct owner_hash; // [[util.smartptr.owner.equal]](util.smartptr.owner.equal "20.3.2.6 Struct owner_­equal"), struct owner_equalstruct owner_equal; // [[util.smartptr.enab]](util.smartptr.enab "20.3.2.7 Class template enable_­shared_­from_­this"), class template enable_shared_from_thistemplate<class T> class enable_shared_from_this; // [[util.smartptr.hash]](util.smartptr.hash "20.3.3 Smart pointer hash support"), hash supporttemplate<class T> struct hash; // freestandingtemplate<class T, class D> struct hash<unique_ptr<T, D>>; // freestandingtemplate<class T> struct hash<shared_ptr<T>>; // [[util.smartptr.atomic]](util.smartptr.atomic "32.5.8.7 Partial specializations for smart pointers"), atomic smart pointerstemplate<class T> struct atomic; // freestandingtemplate<class T> struct atomic<shared_ptr<T>>; template<class T> struct atomic<weak_ptr<T>>; // [[out.ptr.t]](out.ptr.t "20.3.4.1 Class template out_­ptr_­t"), class template out_ptr_ttemplate<class Smart, class Pointer, class... Args>class out_ptr_t; // freestanding// [[out.ptr]](out.ptr "20.3.4.2 Function template out_­ptr"), function template out_ptrtemplate<class Pointer = void, class Smart, class... Args>constexpr auto out_ptr(Smart& s, Args&&... args); // freestanding// [[inout.ptr.t]](inout.ptr.t "20.3.4.3 Class template inout_­ptr_­t"), class template inout_ptr_ttemplate<class Smart, class Pointer, class... Args>class inout_ptr_t; // freestanding// [[inout.ptr]](inout.ptr "20.3.4.4 Function template inout_­ptr"), function template inout_ptrtemplate<class Pointer = void, class Smart, class... Args>constexpr auto inout_ptr(Smart& s, Args&&... args); // freestanding// [[indirect]](indirect "20.4.1 Class template indirect"), class template indirecttemplate<class T, class Allocator = allocator<T>>class indirect; // [[indirect.hash]](indirect.hash "20.4.1.10 Hash support"), hash supporttemplate<class T, class Alloc> struct hash<indirect<T, Alloc>>; // [[polymorphic]](polymorphic "20.4.2 Class template polymorphic"), class template polymorphictemplate<class T, class Allocator = allocator<T>>class polymorphic; namespace pmr {template<class T> using indirect = indirect<T, polymorphic_allocator<T>>; template<class T> using polymorphic = polymorphic<T, polymorphic_allocator<T>>; }}
