tmp/tmpli8org71/{from.md → to.md}
RENAMED
|
@@ -1,15 +1,30 @@
|
|
| 1 |
### Header `<tuple>` synopsis <a id="tuple.syn">[[tuple.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
|
|
|
| 4 |
#include <compare> // see [compare.syn]
|
| 5 |
|
| 6 |
namespace std {
|
| 7 |
// [tuple.tuple], class template tuple
|
| 8 |
template<class... Types>
|
| 9 |
class tuple;
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
// [tuple.creation], tuple creation functions
|
| 12 |
inline constexpr unspecified ignore;
|
| 13 |
|
| 14 |
template<class... TTypes>
|
| 15 |
constexpr tuple<unwrap_ref_decay_t<TTypes>...> make_tuple(TTypes&&...);
|
|
@@ -18,18 +33,18 @@ namespace std {
|
|
| 18 |
constexpr tuple<TTypes&&...> forward_as_tuple(TTypes&&...) noexcept;
|
| 19 |
|
| 20 |
template<class... TTypes>
|
| 21 |
constexpr tuple<TTypes&...> tie(TTypes&...) noexcept;
|
| 22 |
|
| 23 |
-
template<
|
| 24 |
constexpr tuple<CTypes...> tuple_cat(Tuples&&...);
|
| 25 |
|
| 26 |
// [tuple.apply], calling a function with a tuple of arguments
|
| 27 |
-
template<class F,
|
| 28 |
-
constexpr decltype(auto) apply(F&& f, Tuple&& t);
|
| 29 |
|
| 30 |
-
template<class T,
|
| 31 |
constexpr T make_from_tuple(Tuple&& t);
|
| 32 |
|
| 33 |
// [tuple.helper], tuple helper classes
|
| 34 |
template<class T> struct tuple_size; // not defined
|
| 35 |
template<class T> struct tuple_size<const T>;
|
|
@@ -64,23 +79,29 @@ namespace std {
|
|
| 64 |
constexpr const T&& get(const tuple<Types...>&& t) noexcept;
|
| 65 |
|
| 66 |
// [tuple.rel], relational operators
|
| 67 |
template<class... TTypes, class... UTypes>
|
| 68 |
constexpr bool operator==(const tuple<TTypes...>&, const tuple<UTypes...>&);
|
|
|
|
|
|
|
| 69 |
template<class... TTypes, class... UTypes>
|
| 70 |
constexpr common_comparison_category_t<synth-three-way-result<TTypes, UTypes>...>
|
| 71 |
operator<=>(const tuple<TTypes...>&, const tuple<UTypes...>&);
|
|
|
|
|
|
|
| 72 |
|
| 73 |
// [tuple.traits], allocator-related traits
|
| 74 |
template<class... Types, class Alloc>
|
| 75 |
struct uses_allocator<tuple<Types...>, Alloc>;
|
| 76 |
|
| 77 |
// [tuple.special], specialized algorithms
|
| 78 |
template<class... Types>
|
| 79 |
constexpr void swap(tuple<Types...>& x, tuple<Types...>& y) noexcept(see below);
|
|
|
|
|
|
|
| 80 |
|
| 81 |
// [tuple.helper], tuple helper classes
|
| 82 |
template<class T>
|
| 83 |
-
|
| 84 |
}
|
| 85 |
```
|
| 86 |
|
|
|
|
| 1 |
### Header `<tuple>` synopsis <a id="tuple.syn">[[tuple.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
// all freestanding
|
| 5 |
#include <compare> // see [compare.syn]
|
| 6 |
|
| 7 |
namespace std {
|
| 8 |
// [tuple.tuple], class template tuple
|
| 9 |
template<class... Types>
|
| 10 |
class tuple;
|
| 11 |
|
| 12 |
+
// [tuple.like], concept tuple-like
|
| 13 |
+
template<class T>
|
| 14 |
+
concept tuple-like = see belownc; // exposition only
|
| 15 |
+
template<class T>
|
| 16 |
+
concept pair-like = // exposition only
|
| 17 |
+
tuple-like<T> && tuple_size_v<remove_cvref_t<T>> == 2;
|
| 18 |
+
|
| 19 |
+
// [tuple.common.ref], common_reference related specializations
|
| 20 |
+
template<exposition onlyconceptnc{tuple-like} TTuple, exposition onlyconceptnc{tuple-like} UTuple,
|
| 21 |
+
template<class> class TQual, template<class> class UQual>
|
| 22 |
+
struct basic_common_reference<TTuple, UTuple, TQual, UQual>;
|
| 23 |
+
template<exposition onlyconceptnc{tuple-like} TTuple, exposition onlyconceptnc{tuple-like} UTuple>
|
| 24 |
+
struct common_type<TTuple, UTuple>;
|
| 25 |
+
|
| 26 |
// [tuple.creation], tuple creation functions
|
| 27 |
inline constexpr unspecified ignore;
|
| 28 |
|
| 29 |
template<class... TTypes>
|
| 30 |
constexpr tuple<unwrap_ref_decay_t<TTypes>...> make_tuple(TTypes&&...);
|
|
|
|
| 33 |
constexpr tuple<TTypes&&...> forward_as_tuple(TTypes&&...) noexcept;
|
| 34 |
|
| 35 |
template<class... TTypes>
|
| 36 |
constexpr tuple<TTypes&...> tie(TTypes&...) noexcept;
|
| 37 |
|
| 38 |
+
template<exposition onlyconceptnc{tuple-like}... Tuples>
|
| 39 |
constexpr tuple<CTypes...> tuple_cat(Tuples&&...);
|
| 40 |
|
| 41 |
// [tuple.apply], calling a function with a tuple of arguments
|
| 42 |
+
template<class F, exposition onlyconceptnc{tuple-like} Tuple>
|
| 43 |
+
constexpr decltype(auto) apply(F&& f, Tuple&& t) noexcept(see below);
|
| 44 |
|
| 45 |
+
template<class T, exposition onlyconceptnc{tuple-like} Tuple>
|
| 46 |
constexpr T make_from_tuple(Tuple&& t);
|
| 47 |
|
| 48 |
// [tuple.helper], tuple helper classes
|
| 49 |
template<class T> struct tuple_size; // not defined
|
| 50 |
template<class T> struct tuple_size<const T>;
|
|
|
|
| 79 |
constexpr const T&& get(const tuple<Types...>&& t) noexcept;
|
| 80 |
|
| 81 |
// [tuple.rel], relational operators
|
| 82 |
template<class... TTypes, class... UTypes>
|
| 83 |
constexpr bool operator==(const tuple<TTypes...>&, const tuple<UTypes...>&);
|
| 84 |
+
template<class... TTypes, exposition onlyconceptnc{tuple-like} UTuple>
|
| 85 |
+
constexpr bool operator==(const tuple<TTypes...>&, const UTuple&);
|
| 86 |
template<class... TTypes, class... UTypes>
|
| 87 |
constexpr common_comparison_category_t<synth-three-way-result<TTypes, UTypes>...>
|
| 88 |
operator<=>(const tuple<TTypes...>&, const tuple<UTypes...>&);
|
| 89 |
+
template<class... TTypes, exposition onlyconceptnc{tuple-like} UTuple>
|
| 90 |
+
constexpr see belownc operator<=>(const tuple<TTypes...>&, const UTuple&);
|
| 91 |
|
| 92 |
// [tuple.traits], allocator-related traits
|
| 93 |
template<class... Types, class Alloc>
|
| 94 |
struct uses_allocator<tuple<Types...>, Alloc>;
|
| 95 |
|
| 96 |
// [tuple.special], specialized algorithms
|
| 97 |
template<class... Types>
|
| 98 |
constexpr void swap(tuple<Types...>& x, tuple<Types...>& y) noexcept(see below);
|
| 99 |
+
template<class... Types>
|
| 100 |
+
constexpr void swap(const tuple<Types...>& x, const tuple<Types...>& y) noexcept(see below);
|
| 101 |
|
| 102 |
// [tuple.helper], tuple helper classes
|
| 103 |
template<class T>
|
| 104 |
+
constexpr size_t tuple_size_v@ = tuple_size<T>::value;
|
| 105 |
}
|
| 106 |
```
|
| 107 |
|