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