forked from PeterFeicht/cppreference-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtuple
More file actions
148 lines (109 loc) · 4.59 KB
/
tuple
File metadata and controls
148 lines (109 loc) · 4.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/* Copyright (C) 2015 Povilas Kanapickas <povilas@radix.lt>
This file is part of cppreference-doc
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
Unported License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
*/
#ifndef CPPREFERENCE_TUPLE_H
#define CPPREFERENCE_TUPLE_H
#if CPPREFERENCE_STDVER >= 2011
#include <utility> // for std::pair
namespace std {
template<class... Types >
class tuple {
public:
constexpr tuple();
template<class... UTypes >
explicit tuple(UTypes&& ... args);
template<class... UTypes >
tuple(const tuple<UTypes...>& other);
template <class... UTypes>
tuple(tuple<UTypes...>&& other);
template<class U1, class U2 >
tuple(const pair<U1, U2>& p);
template<class U1, class U2 >
tuple(pair<U1, U2>&& p);
tuple(const tuple& other) = default;
tuple(tuple&& other) = default;
template<class Alloc >
tuple(std::allocator_arg_t, const Alloc& a);
template<class Alloc >
tuple(std::allocator_arg_t, const Alloc& a, const Types& ... args);
template<class Alloc, class... UTypes >
tuple(std::allocator_arg_t, const Alloc& a, UTypes&& ... args);
template <class Alloc, class... UTypes>
tuple(std::allocator_arg_t, const Alloc& a, const tuple<UTypes...>& other);
template<class Alloc, class... UTypes >
tuple(std::allocator_arg_t, const Alloc& a, tuple<UTypes...>&& other);
template<class Alloc, class U1, class U2 >
tuple(std::allocator_arg_t, const Alloc& a, const pair<U1, U2>& p);
template<class Alloc, class U1, class U2 >
tuple(std::allocator_arg_t, const Alloc& a, pair<U1, U2>&& p);
template<class Alloc >
tuple(std::allocator_arg_t, const Alloc& a, const tuple& other);
template<class Alloc >
tuple(std::allocator_arg_t, const Alloc& a, tuple&& other);
tuple& operator=(const tuple& other);
tuple& operator=(tuple&& other);
template<class... UTypes >
tuple& operator=(const tuple<UTypes...>& other);
template<class... UTypes >
tuple& operator=(tuple<UTypes...>&& other);
template<class U1, class U2 >
tuple& operator=(const pair<U1, U2>& p);
template<class U1, class U2 >
tuple& operator=(pair<U1, U2>&& p);
void swap(tuple& other);
};
template<class... Types >
tuple<VTypes...> make_tuple(Types&& ... args);
template<class... Types >
tuple<Types& ...> tie(Types& ... args);
template<class... Types >
tuple < Types&& ... > forward_as_tuple(Types&& ... args);
template<class... Tuples >
std::tuple<CTypes...> tuple_cat(Tuples&& ... args);
template<std::size_t I, class... Types >
typename std::tuple_element<I, tuple<Types...> >::type&
get(tuple<Types...>& t);
template<std::size_t I, class... Types >
typename std::tuple_element<I, tuple<Types...> >::type&&
get(tuple<Types...>&& t);
template<std::size_t I, class... Types >
typename std::tuple_element<I, tuple<Types...> >::type const&
get(const tuple<Types...>& t);
template<class... TTypes, class... UTypes >
bool operator==(const tuple<TTypes...>& lhs,
const tuple<UTypes...>& rhs);
template<class... TTypes, class... UTypes >
bool operator!=(const tuple<TTypes...>& lhs,
const tuple<UTypes...>& rhs);
template<class... TTypes, class... UTypes >
bool operator<(const tuple<TTypes...>& lhs,
const tuple<UTypes...>& rhs);
template<class... TTypes, class... UTypes >
bool operator<=(const tuple<TTypes...>& lhs,
const tuple<UTypes...>& rhs);
template<class... TTypes, class... UTypes >
bool operator>(const tuple<TTypes...>& lhs,
const tuple<UTypes...>& rhs);
template<class... TTypes, class... UTypes >
bool operator>=(const tuple<TTypes...>& lhs,
const tuple<UTypes...>& rhs);
template<class... Types >
void swap(tuple<Types...>& lhs, tuple<Types...>& rhs);
template<class... Types >
class tuple_size<std::tuple<Types...> > : public std::integral_constant<std::size_t, sizeof...(Types)> { };
template<std::size_t I, class... Types >
class tuple_element<I, tuple<Types...> > {
typedef void type;
}; // SIMPLIFIED
const void* ignore; // SIMPLIFIED
} // namespace std
#endif // CPPREFERENCE_STDVER >= 2011
#endif // CPPREFERENCE_TUPLE_H