tmp/tmp7rq3d86q/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### General <a id="tuple.tuple.general">[[tuple.tuple.general]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std {
|
| 5 |
+
template<class... Types>
|
| 6 |
+
class tuple {
|
| 7 |
+
public:
|
| 8 |
+
// [tuple.cnstr], tuple construction
|
| 9 |
+
constexpr explicit(see below) tuple();
|
| 10 |
+
constexpr explicit(see below) tuple(const Types&...); // only if sizeof...(Types) >= 1
|
| 11 |
+
template<class... UTypes>
|
| 12 |
+
constexpr explicit(see below) tuple(UTypes&&...); // only if sizeof...(Types) >= 1
|
| 13 |
+
|
| 14 |
+
tuple(const tuple&) = default;
|
| 15 |
+
tuple(tuple&&) = default;
|
| 16 |
+
|
| 17 |
+
template<class... UTypes>
|
| 18 |
+
constexpr explicit(see below) tuple(tuple<UTypes...>&);
|
| 19 |
+
template<class... UTypes>
|
| 20 |
+
constexpr explicit(see below) tuple(const tuple<UTypes...>&);
|
| 21 |
+
template<class... UTypes>
|
| 22 |
+
constexpr explicit(see below) tuple(tuple<UTypes...>&&);
|
| 23 |
+
template<class... UTypes>
|
| 24 |
+
constexpr explicit(see below) tuple(const tuple<UTypes...>&&);
|
| 25 |
+
|
| 26 |
+
template<class U1, class U2>
|
| 27 |
+
constexpr explicit(see below) tuple(pair<U1, U2>&); // only if sizeof...(Types) == 2
|
| 28 |
+
template<class U1, class U2>
|
| 29 |
+
constexpr explicit(see below) tuple(const pair<U1, U2>&); // only if sizeof...(Types) == 2
|
| 30 |
+
template<class U1, class U2>
|
| 31 |
+
constexpr explicit(see below) tuple(pair<U1, U2>&&); // only if sizeof...(Types) == 2
|
| 32 |
+
template<class U1, class U2>
|
| 33 |
+
constexpr explicit(see below) tuple(const pair<U1, U2>&&); // only if sizeof...(Types) == 2
|
| 34 |
+
|
| 35 |
+
template<tuple-like UTuple>
|
| 36 |
+
constexpr explicit(see below) tuple(UTuple&&);
|
| 37 |
+
|
| 38 |
+
// allocator-extended constructors
|
| 39 |
+
template<class Alloc>
|
| 40 |
+
constexpr explicit(see below)
|
| 41 |
+
tuple(allocator_arg_t, const Alloc& a);
|
| 42 |
+
template<class Alloc>
|
| 43 |
+
constexpr explicit(see below)
|
| 44 |
+
tuple(allocator_arg_t, const Alloc& a, const Types&...);
|
| 45 |
+
template<class Alloc, class... UTypes>
|
| 46 |
+
constexpr explicit(see below)
|
| 47 |
+
tuple(allocator_arg_t, const Alloc& a, UTypes&&...);
|
| 48 |
+
template<class Alloc>
|
| 49 |
+
constexpr tuple(allocator_arg_t, const Alloc& a, const tuple&);
|
| 50 |
+
template<class Alloc>
|
| 51 |
+
constexpr tuple(allocator_arg_t, const Alloc& a, tuple&&);
|
| 52 |
+
template<class Alloc, class... UTypes>
|
| 53 |
+
constexpr explicit(see below)
|
| 54 |
+
tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...>&);
|
| 55 |
+
template<class Alloc, class... UTypes>
|
| 56 |
+
constexpr explicit(see below)
|
| 57 |
+
tuple(allocator_arg_t, const Alloc& a, const tuple<UTypes...>&);
|
| 58 |
+
template<class Alloc, class... UTypes>
|
| 59 |
+
constexpr explicit(see below)
|
| 60 |
+
tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...>&&);
|
| 61 |
+
template<class Alloc, class... UTypes>
|
| 62 |
+
constexpr explicit(see below)
|
| 63 |
+
tuple(allocator_arg_t, const Alloc& a, const tuple<UTypes...>&&);
|
| 64 |
+
template<class Alloc, class U1, class U2>
|
| 65 |
+
constexpr explicit(see below)
|
| 66 |
+
tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&);
|
| 67 |
+
template<class Alloc, class U1, class U2>
|
| 68 |
+
constexpr explicit(see below)
|
| 69 |
+
tuple(allocator_arg_t, const Alloc& a, const pair<U1, U2>&);
|
| 70 |
+
template<class Alloc, class U1, class U2>
|
| 71 |
+
constexpr explicit(see below)
|
| 72 |
+
tuple(allocator_arg_t, const Alloc& a, pair<U1, U2>&&);
|
| 73 |
+
template<class Alloc, class U1, class U2>
|
| 74 |
+
constexpr explicit(see below)
|
| 75 |
+
tuple(allocator_arg_t, const Alloc& a, const pair<U1, U2>&&);
|
| 76 |
+
|
| 77 |
+
template<class Alloc, exposition onlyconceptnc{tuple-like} UTuple>
|
| 78 |
+
constexpr explicit(see below) tuple(allocator_arg_t, const Alloc& a, UTuple&&);
|
| 79 |
+
|
| 80 |
+
// [tuple.assign], tuple assignment
|
| 81 |
+
constexpr tuple& operator=(const tuple&);
|
| 82 |
+
constexpr const tuple& operator=(const tuple&) const;
|
| 83 |
+
constexpr tuple& operator=(tuple&&) noexcept(see below);
|
| 84 |
+
constexpr const tuple& operator=(tuple&&) const;
|
| 85 |
+
|
| 86 |
+
template<class... UTypes>
|
| 87 |
+
constexpr tuple& operator=(const tuple<UTypes...>&);
|
| 88 |
+
template<class... UTypes>
|
| 89 |
+
constexpr const tuple& operator=(const tuple<UTypes...>&) const;
|
| 90 |
+
template<class... UTypes>
|
| 91 |
+
constexpr tuple& operator=(tuple<UTypes...>&&);
|
| 92 |
+
template<class... UTypes>
|
| 93 |
+
constexpr const tuple& operator=(tuple<UTypes...>&&) const;
|
| 94 |
+
|
| 95 |
+
template<class U1, class U2>
|
| 96 |
+
constexpr tuple& operator=(const pair<U1, U2>&); // only if sizeof...(Types) == 2
|
| 97 |
+
template<class U1, class U2>
|
| 98 |
+
constexpr const tuple& operator=(const pair<U1, U2>&) const;
|
| 99 |
+
// only if sizeof...(Types) == 2
|
| 100 |
+
template<class U1, class U2>
|
| 101 |
+
constexpr tuple& operator=(pair<U1, U2>&&); // only if sizeof...(Types) == 2
|
| 102 |
+
template<class U1, class U2>
|
| 103 |
+
constexpr const tuple& operator=(pair<U1, U2>&&) const; // only if sizeof...(Types) == 2
|
| 104 |
+
|
| 105 |
+
template<exposition onlyconceptnc{tuple-like} UTuple>
|
| 106 |
+
constexpr tuple& operator=(UTuple&&);
|
| 107 |
+
template<exposition onlyconceptnc{tuple-like}@ UTuple>
|
| 108 |
+
constexpr const tuple& operator=(UTuple&&) const;
|
| 109 |
+
|
| 110 |
+
// [tuple.swap], tuple swap
|
| 111 |
+
constexpr void swap(tuple&) noexcept(see below);
|
| 112 |
+
constexpr void swap(const tuple&) const noexcept(see below);
|
| 113 |
+
};
|
| 114 |
+
|
| 115 |
+
template<class... UTypes>
|
| 116 |
+
tuple(UTypes...) -> tuple<UTypes...>;
|
| 117 |
+
template<class T1, class T2>
|
| 118 |
+
tuple(pair<T1, T2>) -> tuple<T1, T2>;
|
| 119 |
+
template<class Alloc, class... UTypes>
|
| 120 |
+
tuple(allocator_arg_t, Alloc, UTypes...) -> tuple<UTypes...>;
|
| 121 |
+
template<class Alloc, class T1, class T2>
|
| 122 |
+
tuple(allocator_arg_t, Alloc, pair<T1, T2>) -> tuple<T1, T2>;
|
| 123 |
+
template<class Alloc, class... UTypes>
|
| 124 |
+
tuple(allocator_arg_t, Alloc, tuple<UTypes...>) -> tuple<UTypes...>;
|
| 125 |
+
}
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
If a program declares an explicit or partial specialization of `tuple`,
|
| 129 |
+
the program is ill-formed, no diagnostic required.
|
| 130 |
+
|