Debian Codegraph @

libcxx/modules/std/memory.inc

raw
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9
10 export namespace std {
11 // [pointer.traits], pointer traits
12 using std::pointer_traits;
13
14 // [pointer.conversion], pointer conversion
15 using std::to_address;
16
17 // [ptr.align], pointer alignment
18 using std::align;
19 using std::assume_aligned;
20
21 // [obj.lifetime], explicit lifetime management
22 // using std::start_lifetime_as;
23 // using std::start_lifetime_as_array;
24
25 // [allocator.tag], allocator argument tag
26 using std::allocator_arg;
27 using std::allocator_arg_t;
28
29 // [allocator.uses], uses_allocator
30 using std::uses_allocator;
31
32 // [allocator.uses.trait], uses_allocator
33 using std::uses_allocator_v;
34
35 // [allocator.uses.construction], uses-allocator construction
36 using std::uses_allocator_construction_args;
37
38 using std::make_obj_using_allocator;
39 using std::uninitialized_construct_using_allocator;
40
41 // [allocator.traits], allocator traits
42 using std::allocator_traits;
43
44 #if _LIBCPP_STD_VER >= 23
45 using std::allocation_result;
46 #endif
47
48 // [default.allocator], the default allocator
49 using std::allocator;
50 using std::operator==;
51
52 // [specialized.addressof], addressof
53 using std::addressof;
54
55 // [specialized.algorithms], specialized algorithms
56 // [special.mem.concepts], special memory concepts
57
58 using std::uninitialized_default_construct;
59 using std::uninitialized_default_construct_n;
60
61 namespace ranges {
62 using std::ranges::uninitialized_default_construct;
63 using std::ranges::uninitialized_default_construct_n;
64 } // namespace ranges
65
66 using std::uninitialized_value_construct;
67 using std::uninitialized_value_construct_n;
68
69 namespace ranges {
70 using std::ranges::uninitialized_value_construct;
71 using std::ranges::uninitialized_value_construct_n;
72 } // namespace ranges
73
74 using std::uninitialized_copy;
75 using std::uninitialized_copy_n;
76
77 namespace ranges {
78 using std::ranges::uninitialized_copy;
79 using std::ranges::uninitialized_copy_result;
80
81 using std::ranges::uninitialized_copy_n;
82 using std::ranges::uninitialized_copy_n_result;
83 } // namespace ranges
84
85 using std::uninitialized_move;
86 using std::uninitialized_move_n;
87
88 namespace ranges {
89 using std::ranges::uninitialized_move;
90 using std::ranges::uninitialized_move_result;
91
92 using std::ranges::uninitialized_move_n;
93 using std::ranges::uninitialized_move_n_result;
94 } // namespace ranges
95
96 using std::uninitialized_fill;
97 using std::uninitialized_fill_n;
98
99 namespace ranges {
100 using std::ranges::uninitialized_fill;
101 using std::ranges::uninitialized_fill_n;
102 } // namespace ranges
103
104 // [specialized.construct], construct_at
105 using std::construct_at;
106
107 namespace ranges {
108 using std::ranges::construct_at;
109 }
110 // [specialized.destroy], destroy
111 using std::destroy;
112 using std::destroy_at;
113 using std::destroy_n;
114
115 namespace ranges {
116 using std::ranges::destroy;
117 using std::ranges::destroy_at;
118 using std::ranges::destroy_n;
119 } // namespace ranges
120
121 // [unique.ptr], class template unique_ptr
122 using std::default_delete;
123 using std::unique_ptr;
124
125 using std::make_unique;
126 using std::make_unique_for_overwrite;
127
128 using std::operator<;
129 using std::operator>;
130 using std::operator<=;
131 using std::operator>=;
132 using std::operator<=>;
133
134 using std::operator<<;
135
136 // [util.smartptr.weak.bad], class bad_weak_ptr
137 using std::bad_weak_ptr;
138
139 // [util.smartptr.shared], class template shared_ptr
140 using std::shared_ptr;
141
142 // [util.smartptr.shared.create], shared_ptr creation
143 using std::allocate_shared;
144 using std::allocate_shared_for_overwrite;
145 using std::make_shared;
146 using std::make_shared_for_overwrite;
147
148 // [util.smartptr.shared.spec], shared_ptr specialized algorithms
149 using std::swap;
150
151 // [util.smartptr.shared.cast], shared_ptr casts
152 using std::const_pointer_cast;
153 using std::dynamic_pointer_cast;
154 using std::reinterpret_pointer_cast;
155 using std::static_pointer_cast;
156
157 #ifndef _LIBCPP_HAS_NO_RTTI
158 using std::get_deleter;
159 #endif // _LIBCPP_HAS_NO_RTTI
160
161 // [util.smartptr.shared.io], shared_ptr I/O
162
163 // [util.smartptr.weak], class template weak_ptr
164 using std::weak_ptr;
165
166 // [util.smartptr.weak.spec], weak_ptr specialized algorithms
167
168 // [util.smartptr.ownerless], class template owner_less
169 using std::owner_less;
170
171 // [util.smartptr.enab], class template enable_shared_from_this
172 using std::enable_shared_from_this;
173
174 // [util.smartptr.hash], hash support
175 using std::hash;
176
177 // [util.smartptr.atomic], atomic smart pointers
178 // using std::atomic;
179
180 #if _LIBCPP_STD_VER >= 23
181 // [out.ptr.t], class template out_ptr_t
182 using std::out_ptr_t;
183
184 // [out.ptr], function template out_ptr
185 using std::out_ptr;
186
187 // [inout.ptr.t], class template inout_ptr_t
188 using std::inout_ptr_t;
189
190 // [inout.ptr], function template inout_ptr
191 using std::inout_ptr;
192 #endif // _LIBCPP_STD_VER >= 23
193
194 #ifndef _LIBCPP_HAS_NO_THREADS
195 // [depr.util.smartptr.shared.atomic]
196 using std::atomic_is_lock_free;
197
198 using std::atomic_load;
199 using std::atomic_load_explicit;
200
201 using std::atomic_store;
202 using std::atomic_store_explicit;
203
204 using std::atomic_exchange;
205 using std::atomic_exchange_explicit;
206
207 using std::atomic_compare_exchange_strong;
208 using std::atomic_compare_exchange_strong_explicit;
209 using std::atomic_compare_exchange_weak;
210 using std::atomic_compare_exchange_weak_explicit;
211 #endif // _LIBCPP_HAS_NO_THREADS
212 } // namespace std