2 //===----------------------------------------------------------------------===//
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
8 //===----------------------------------------------------------------------===//
10 export namespace std {
11 // [pointer.traits], pointer traits
12 using std::pointer_traits;
14 // [pointer.conversion], pointer conversion
15 using std::to_address;
17 // [ptr.align], pointer alignment
19 using std::assume_aligned;
21 // [obj.lifetime], explicit lifetime management
22 // using std::start_lifetime_as;
23 // using std::start_lifetime_as_array;
25 // [allocator.tag], allocator argument tag
26 using std::allocator_arg;
27 using std::allocator_arg_t;
29 // [allocator.uses], uses_allocator
30 using std::uses_allocator;
32 // [allocator.uses.trait], uses_allocator
33 using std::uses_allocator_v;
35 // [allocator.uses.construction], uses-allocator construction
36 using std::uses_allocator_construction_args;
38 using std::make_obj_using_allocator;
39 using std::uninitialized_construct_using_allocator;
41 // [allocator.traits], allocator traits
42 using std::allocator_traits;
44 #if _LIBCPP_STD_VER >= 23
45 using std::allocation_result;
48 // [default.allocator], the default allocator
50 using std::operator==;
52 // [specialized.addressof], addressof
55 // [specialized.algorithms], specialized algorithms
56 // [special.mem.concepts], special memory concepts
58 using std::uninitialized_default_construct;
59 using std::uninitialized_default_construct_n;
62 using std::ranges::uninitialized_default_construct;
63 using std::ranges::uninitialized_default_construct_n;
66 using std::uninitialized_value_construct;
67 using std::uninitialized_value_construct_n;
70 using std::ranges::uninitialized_value_construct;
71 using std::ranges::uninitialized_value_construct_n;
74 using std::uninitialized_copy;
75 using std::uninitialized_copy_n;
78 using std::ranges::uninitialized_copy;
79 using std::ranges::uninitialized_copy_result;
81 using std::ranges::uninitialized_copy_n;
82 using std::ranges::uninitialized_copy_n_result;
85 using std::uninitialized_move;
86 using std::uninitialized_move_n;
89 using std::ranges::uninitialized_move;
90 using std::ranges::uninitialized_move_result;
92 using std::ranges::uninitialized_move_n;
93 using std::ranges::uninitialized_move_n_result;
96 using std::uninitialized_fill;
97 using std::uninitialized_fill_n;
100 using std::ranges::uninitialized_fill;
101 using std::ranges::uninitialized_fill_n;
102 } // namespace ranges
104 // [specialized.construct], construct_at
105 using std::construct_at;
108 using std::ranges::construct_at;
110 // [specialized.destroy], destroy
112 using std::destroy_at;
113 using std::destroy_n;
116 using std::ranges::destroy;
117 using std::ranges::destroy_at;
118 using std::ranges::destroy_n;
119 } // namespace ranges
121 // [unique.ptr], class template unique_ptr
122 using std::default_delete;
123 using std::unique_ptr;
125 using std::make_unique;
126 using std::make_unique_for_overwrite;
128 using std::operator<;
129 using std::operator>;
130 using std::operator<=;
131 using std::operator>=;
132 using std::operator<=>;
134 using std::operator<<;
136 // [util.smartptr.weak.bad], class bad_weak_ptr
137 using std::bad_weak_ptr;
139 // [util.smartptr.shared], class template shared_ptr
140 using std::shared_ptr;
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;
148 // [util.smartptr.shared.spec], shared_ptr specialized algorithms
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;
158 using std::get_deleter;
159 #endif // _LIBCPP_HAS_RTTI
161 // [util.smartptr.shared.io], shared_ptr I/O
163 // [util.smartptr.weak], class template weak_ptr
166 // [util.smartptr.weak.spec], weak_ptr specialized algorithms
168 // [util.smartptr.ownerless], class template owner_less
169 using std::owner_less;
171 // [util.smartptr.enab], class template enable_shared_from_this
172 using std::enable_shared_from_this;
174 // [util.smartptr.hash], hash support
177 // [util.smartptr.atomic], atomic smart pointers
178 // using std::atomic;
180 #if _LIBCPP_STD_VER >= 23
181 // [out.ptr.t], class template out_ptr_t
182 using std::out_ptr_t;
184 // [out.ptr], function template out_ptr
187 // [inout.ptr.t], class template inout_ptr_t
188 using std::inout_ptr_t;
190 // [inout.ptr], function template inout_ptr
191 using std::inout_ptr;
192 #endif // _LIBCPP_STD_VER >= 23
194 #if _LIBCPP_HAS_THREADS
195 // [depr.util.smartptr.shared.atomic]
196 using std::atomic_is_lock_free;
198 using std::atomic_load;
199 using std::atomic_load_explicit;
201 using std::atomic_store;
202 using std::atomic_store_explicit;
204 using std::atomic_exchange;
205 using std::atomic_exchange_explicit;
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_THREADS