tmp/tmpl8ktj66n/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Synopsis <a id="indirect.syn">[[indirect.syn]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std {
|
| 5 |
+
template<class T, class Allocator = allocator<T>>
|
| 6 |
+
class indirect {
|
| 7 |
+
public:
|
| 8 |
+
using value_type = T;
|
| 9 |
+
using allocator_type = Allocator;
|
| 10 |
+
using pointer = allocator_traits<Allocator>::pointer;
|
| 11 |
+
using const_pointer = allocator_traits<Allocator>::const_pointer;
|
| 12 |
+
|
| 13 |
+
// [indirect.ctor], constructors
|
| 14 |
+
constexpr explicit indirect();
|
| 15 |
+
constexpr explicit indirect(allocator_arg_t, const Allocator& a);
|
| 16 |
+
constexpr indirect(const indirect& other);
|
| 17 |
+
constexpr indirect(allocator_arg_t, const Allocator& a, const indirect& other);
|
| 18 |
+
constexpr indirect(indirect&& other) noexcept;
|
| 19 |
+
constexpr indirect(allocator_arg_t, const Allocator& a, indirect&& other)
|
| 20 |
+
noexcept(see below);
|
| 21 |
+
template<class U = T>
|
| 22 |
+
constexpr explicit indirect(U&& u);
|
| 23 |
+
template<class U = T>
|
| 24 |
+
constexpr explicit indirect(allocator_arg_t, const Allocator& a, U&& u);
|
| 25 |
+
template<class... Us>
|
| 26 |
+
constexpr explicit indirect(in_place_t, Us&&... us);
|
| 27 |
+
template<class... Us>
|
| 28 |
+
constexpr explicit indirect(allocator_arg_t, const Allocator& a,
|
| 29 |
+
in_place_t, Us&&... us);
|
| 30 |
+
template<class I, class... Us>
|
| 31 |
+
constexpr explicit indirect(in_place_t, initializer_list<I> ilist, Us&&... us);
|
| 32 |
+
template<class I, class... Us>
|
| 33 |
+
constexpr explicit indirect(allocator_arg_t, const Allocator& a,
|
| 34 |
+
in_place_t, initializer_list<I> ilist, Us&&... us);
|
| 35 |
+
|
| 36 |
+
// [indirect.dtor], destructor
|
| 37 |
+
constexpr ~indirect();
|
| 38 |
+
|
| 39 |
+
// [indirect.assign], assignment
|
| 40 |
+
constexpr indirect& operator=(const indirect& other);
|
| 41 |
+
constexpr indirect& operator=(indirect&& other) noexcept(see below);
|
| 42 |
+
template<class U = T>
|
| 43 |
+
constexpr indirect& operator=(U&& u);
|
| 44 |
+
|
| 45 |
+
// [indirect.obs], observers
|
| 46 |
+
constexpr const T& operator*() const & noexcept;
|
| 47 |
+
constexpr T& operator*() & noexcept;
|
| 48 |
+
constexpr const T&& operator*() const && noexcept;
|
| 49 |
+
constexpr T&& operator*() && noexcept;
|
| 50 |
+
constexpr const_pointer operator->() const noexcept;
|
| 51 |
+
constexpr pointer operator->() noexcept;
|
| 52 |
+
constexpr bool valueless_after_move() const noexcept;
|
| 53 |
+
constexpr allocator_type get_allocator() const noexcept;
|
| 54 |
+
|
| 55 |
+
// [indirect.swap], swap
|
| 56 |
+
constexpr void swap(indirect& other) noexcept(see below);
|
| 57 |
+
friend constexpr void swap(indirect& lhs, indirect& rhs) noexcept(see below);
|
| 58 |
+
|
| 59 |
+
// [indirect.relops], relational operators
|
| 60 |
+
template<class U, class AA>
|
| 61 |
+
friend constexpr bool operator==(const indirect& lhs, const indirect<U, AA>& rhs)
|
| 62 |
+
noexcept(see below);
|
| 63 |
+
template<class U, class AA>
|
| 64 |
+
friend constexpr auto operator<=>(const indirect& lhs, const indirect<U, AA>& rhs)
|
| 65 |
+
-> synth-three-way-result<T, U>;
|
| 66 |
+
|
| 67 |
+
// [indirect.comp.with.t], comparison with T
|
| 68 |
+
template<class U>
|
| 69 |
+
friend constexpr bool operator==(const indirect& lhs, const U& rhs) noexcept(see below);
|
| 70 |
+
template<class U>
|
| 71 |
+
friend constexpr auto operator<=>(const indirect& lhs, const U& rhs)
|
| 72 |
+
-> synth-three-way-result<T, U>;
|
| 73 |
+
|
| 74 |
+
private:
|
| 75 |
+
pointer p; // exposition only
|
| 76 |
+
Allocator alloc = Allocator(); // exposition only
|
| 77 |
+
};
|
| 78 |
+
template<class Value>
|
| 79 |
+
indirect(Value) -> indirect<Value>;
|
| 80 |
+
template<class Allocator, class Value>
|
| 81 |
+
indirect(allocator_arg_t, Allocator, Value)
|
| 82 |
+
-> indirect<Value, typename allocator_traits<Allocator>::template rebind_alloc<Value>>;
|
| 83 |
+
}
|
| 84 |
+
```
|
| 85 |
+
|