7template <
class First,
class Second>
24 template <
class F2,
class S2,
25 class = std::enable_if_t<std::is_constructible<First, F2 &&>::value && std::is_constructible<Second, S2 &&>::value>>
35 template<
class F2,
class S2,
36 class = std::enable_if_t<std::is_constructible<First, F2 const &>::value && std::is_constructible<Second, S2 const &>::value>>
37 constexpr qpair(std::pair<F2, S2>
const &p)
43 template<
class F2,
class S2,
44 class = std::enable_if_t<std::is_constructible<First, F2 &&>::value && std::is_constructible<Second, S2 &&>::value>>
45 constexpr qpair(std::pair<F2, S2> &&p)
51 template<class F2, class S2, std::enable_if_t<std::is_constructible<First, F2 const &>::value && std::is_constructible<Second, S2 const &>::value && !(std::is_same<First, F2>::value && std::is_same<Second, S2>::value),
int> = 0 >
58 template<class F2, class S2, std::enable_if_t<std::is_constructible<First, F2 &&>::value && std::is_constructible<Second, S2 &&>::value && !(std::is_same<First, F2>::value && std::is_same<Second, S2>::value),
int> = 0 >
65 noexcept(std::swap(
second, other.second)))
73 template<
class F2 = First,
class S2 = Second>
74 explicit operator std::pair<std::decay_t<F2>, std::decay_t<S2>>()
const {
return {
first,
second }; }
77template<
class F,
class S>
84template<
class T1,
class T2>
89 std::forward<T1>(a), std::forward<T2>(b));
93template<
class T1,
class T2>
97template<
class F,
class S>
102template<
class F,
class S>
107template<
class F,
class S>
112template<
class F,
class S>
117template<
class F,
class S>
122template<
class F,
class S>
128template <
class T,
class U>
138template<std::
size_t I,
class F,
class S>
constexpr auto &
get(
qpair<F, S> &p)
noexcept
140 static_assert(I < 2,
"");
141 if constexpr ( I == 0 )
146template<std::
size_t I,
class F,
class S>
constexpr auto const &
get(
qpair<F, S> const &p)
noexcept
148 static_assert(I < 2,
"");
149 if constexpr ( I == 0 )
154template<std::
size_t I,
class F,
class S>
constexpr auto &&
get(
qpair<F, S> &&p)
noexcept
156 static_assert(I < 2,
"");
157 if constexpr ( I == 0 )
158 return std::move(p.first);
160 return std::move(p.second);
166 template<
class F,
class S>
struct tuple_size<
qpair<F, S>> : std::integral_constant<std::size_t, 2> {};
167 template<
class F,
class S>
struct tuple_element<0,
qpair<F, S>> {
using type = F; };
168 template<
class F,
class S>
struct tuple_element<1,
qpair<F, S>> {
using type = S; };
int code
Definition fpro.h:88
constexpr bool operator<(qpair< F, S > const &a, qpair< F, S > const &b)
Definition qpair.hpp:108
constexpr auto & get(qpair< F, S > &p) noexcept
Definition qpair.hpp:138
qpair(T1, T2) -> qpair< std::decay_t< T1 >, std::decay_t< T2 > >
constexpr qpair< std::decay_t< T1 >, std::decay_t< T2 > > make_qpair(T1 &&a, T2 &&b)
Definition qpair.hpp:86
constexpr bool operator!=(qpair< F, S > const &a, qpair< F, S > const &b)
Definition qpair.hpp:103
void swap(qpair< F, S > &a, qpair< F, S > &b) noexcept(noexcept(a.swap(b)))
Definition qpair.hpp:78
constexpr bool operator==(qpair< F, S > const &a, qpair< F, S > const &b)
Definition qpair.hpp:98
constexpr bool operator<=(qpair< F, S > const &a, qpair< F, S > const &b)
Definition qpair.hpp:118
constexpr bool operator>=(qpair< F, S > const &a, qpair< F, S > const &b)
Definition qpair.hpp:123
constexpr bool operator>(qpair< F, S > const &a, qpair< F, S > const &b)
Definition qpair.hpp:113
int compare(const qpair< T, U > &a, const qpair< T, U > &b)
Definition qpair.hpp:129
void swap(qpair &other) noexcept(noexcept(std::swap(first, other.first)) &&noexcept(std::swap(second, other.second)))
Definition qpair.hpp:64
constexpr qpair()=default
qpair & operator=(qpair const &)=default
First first_type
Definition qpair.hpp:10
constexpr qpair(First const &a, Second const &b)
Definition qpair.hpp:18
T second
Definition qpair.hpp:14
constexpr qpair(qpair< F2, S2 > const &p)
Definition qpair.hpp:52
constexpr qpair(F2 &&a, S2 &&b)
Definition qpair.hpp:26
Second second_type
Definition qpair.hpp:11
constexpr qpair(std::pair< F2, S2 > const &p)
Definition qpair.hpp:37
constexpr qpair(First &&a, Second const &b)
Definition qpair.hpp:20
qpair(qpair const &)=default
constexpr qpair(First &&a, Second &&b)
Definition qpair.hpp:21
constexpr qpair(std::pair< F2, S2 > &&p)
Definition qpair.hpp:45
qpair & operator=(qpair &&)=default
const Key first
Definition qpair.hpp:13
constexpr qpair(First const &a, Second &&b)
Definition qpair.hpp:19
constexpr qpair(qpair< F2, S2 > &&p)
Definition qpair.hpp:59
F type
Definition qpair.hpp:167
S type
Definition qpair.hpp:168