Mark de Wever | c40595f | 2023-02-28 19:29:26 | [diff] [blame^] | 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 | module; |
| 11 | #include <memory> |
| 12 | |
| 13 | export module std:memory; |
| 14 | export 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 | using std::operator<=>; |
| 140 | |
| 141 | using std::operator<<; |
| 142 | |
| 143 | // [util.smartptr.weak.bad], class bad_weak_ptr |
| 144 | using std::bad_weak_ptr; |
| 145 | |
| 146 | // [util.smartptr.shared], class template shared_ptr |
| 147 | using std::shared_ptr; |
| 148 | |
| 149 | // [util.smartptr.shared.create], shared_ptr creation |
| 150 | using std::allocate_shared; |
| 151 | using std::allocate_shared_for_overwrite; |
| 152 | using std::make_shared; |
| 153 | using std::make_shared_for_overwrite; |
| 154 | |
| 155 | // [util.smartptr.shared.spec], shared_ptr specialized algorithms |
| 156 | using std::swap; |
| 157 | |
| 158 | // [util.smartptr.shared.cast], shared_ptr casts |
| 159 | using std::const_pointer_cast; |
| 160 | using std::dynamic_pointer_cast; |
| 161 | using std::reinterpret_pointer_cast; |
| 162 | using std::static_pointer_cast; |
| 163 | |
| 164 | using std::get_deleter; |
| 165 | |
| 166 | // [util.smartptr.shared.io], shared_ptr I/O |
| 167 | |
| 168 | // [util.smartptr.weak], class template weak_ptr |
| 169 | using std::weak_ptr; |
| 170 | |
| 171 | // [util.smartptr.weak.spec], weak_ptr specialized algorithms |
| 172 | |
| 173 | // [util.smartptr.ownerless], class template owner_less |
| 174 | using std::owner_less; |
| 175 | |
| 176 | // [util.smartptr.enab], class template enable_shared_from_this |
| 177 | using std::enable_shared_from_this; |
| 178 | |
| 179 | // [util.smartptr.hash], hash support |
| 180 | using std::hash; |
| 181 | |
| 182 | // [util.smartptr.atomic], atomic smart pointers |
| 183 | // using std::atomic; |
| 184 | |
| 185 | // [out.ptr.t], class template out_ptr_t |
| 186 | // using std::out_ptr_t; |
| 187 | |
| 188 | // [out.ptr], function template out_ptr |
| 189 | // using std::out_ptr; |
| 190 | |
| 191 | // [inout.ptr.t], class template inout_ptr_t |
| 192 | // using std::inout_ptr_t; |
| 193 | |
| 194 | // [inout.ptr], function template inout_ptr |
| 195 | // using std::inout_ptr; |
| 196 | |
| 197 | // [depr.util.smartptr.shared.atomic] |
| 198 | using std::atomic_is_lock_free; |
| 199 | |
| 200 | using std::atomic_load; |
| 201 | using std::atomic_load_explicit; |
| 202 | |
| 203 | using std::atomic_store; |
| 204 | using std::atomic_store_explicit; |
| 205 | |
| 206 | using std::atomic_exchange; |
| 207 | using std::atomic_exchange_explicit; |
| 208 | |
| 209 | using std::atomic_compare_exchange_strong; |
| 210 | using std::atomic_compare_exchange_strong_explicit; |
| 211 | using std::atomic_compare_exchange_weak; |
| 212 | using std::atomic_compare_exchange_weak_explicit; |
| 213 | } // namespace std |