A std::pair implementation that incorporates most changes from C++23's standard library. More...
#include <seqan3/utility/tuple/common_pair.hpp>
Public Member Functions | |
Default constructors and assignments. | |
common_pair ()=default | |
Defaulted. | |
common_pair (common_pair const &)=default | |
Defaulted. | |
common_pair & | operator= (common_pair const &)=default |
Defaulted. | |
~common_pair ()=default | |
Construct from arguments. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 &> && std::is_constructible_v<T2, U2 &>) | |
constexpr | common_pair (U1 &first, U2 &second) |
Constructs from arguments. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 const> && std::is_constructible_v<T2, U2 const>) | |
constexpr | common_pair (U1 const &first, U2 const &second) |
Constructs from arguments. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1> && std::is_constructible_v<T2, U2>) | |
constexpr | common_pair (U1 &&first, U2 &&second) |
Constructs from arguments. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 const> && std::is_constructible_v<T2, U2 const>) | |
constexpr | common_pair (U1 const &&first, U2 const &&second) |
Constructs from arguments. | |
Construct from common_pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 &> && std::is_constructible_v<T2, U2 &>) | |
constexpr | common_pair (common_pair< U1, U2 > &other) |
Constructs from common_pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 const> && std::is_constructible_v<T2, U2 const>) | |
constexpr | common_pair (common_pair< U1, U2 > const &other) |
Constructs from common_pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1> && std::is_constructible_v<T2, U2>) | |
constexpr | common_pair (common_pair< U1, U2 > &&other) |
Constructs from common_pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 const> && std::is_constructible_v<T2, U2 const>) | |
constexpr | common_pair (common_pair< U1, U2 > const &&other) |
Constructs from common_pair. | |
Construct from std::pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 &> && std::is_constructible_v<T2, U2 &>) | |
constexpr | common_pair (std::pair< U1, U2 > &other) |
Constructs from std::pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 const> && std::is_constructible_v<T2, U2 const>) | |
constexpr | common_pair (std::pair< U1, U2 > const &other) |
Constructs from std::pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1> && std::is_constructible_v<T2, U2>) | |
constexpr | common_pair (std::pair< U1, U2 > &&other) |
Constructs from std::pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<T1, U1 const> && std::is_constructible_v<T2, U2 const>) | |
constexpr | common_pair (std::pair< U1, U2 > const &&other) |
Constructs from std::pair. | |
Assign from common_pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1, U1 &> && std::is_assignable_v<T2, U2 &>) | |
constexpr common_pair & | operator= (common_pair< U1, U2 > &other) |
Assigns from common_pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1, U1 const> && std::is_assignable_v<T2, U2 const>) | |
constexpr common_pair & | operator= (common_pair< U1, U2 > const &other) |
Assigns from common_pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1, U1> && std::is_assignable_v<T2, U2>) | |
constexpr common_pair & | operator= (common_pair< U1, U2 > &&other) |
Assigns from common_pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1, U1 const> && std::is_assignable_v<T2, U2 const>) | |
constexpr common_pair & | operator= (common_pair< U1, U2 > const &&other) |
Assigns from common_pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1 const, U1 &> && std::is_assignable_v<T2 const, U2 &>) | |
constexpr common_pair const & | operator= (common_pair< U1, U2 > &other) const |
Assigns from common_pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1 const, U1 const> && std::is_assignable_v<T2 const, U2 const>) | |
constexpr common_pair const & | operator= (common_pair< U1, U2 > const &other) const |
Assigns from common_pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1 const, U1> && std::is_assignable_v<T2 const, U2>) | |
constexpr common_pair const & | operator= (common_pair< U1, U2 > &&other) const |
Assigns from common_pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1 const, U1 const> && std::is_assignable_v<T2 const, U2 const>) | |
constexpr common_pair const & | operator= (common_pair< U1, U2 > const &&other) const |
Assigns from common_pair. | |
Assign from std::pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1, U1 &> && std::is_assignable_v<T2, U2 &>) | |
constexpr common_pair & | operator= (std::pair< U1, U2 > &other) |
Assigns from std::pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1, U1 const> && std::is_assignable_v<T2, U2 const>) | |
constexpr common_pair & | operator= (std::pair< U1, U2 > const &other) |
Assigns from std::pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1, U1> && std::is_assignable_v<T2, U2>) | |
constexpr common_pair & | operator= (std::pair< U1, U2 > &&other) |
Assigns from std::pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1, U1 const> && std::is_assignable_v<T2, U2 const>) | |
constexpr common_pair & | operator= (std::pair< U1, U2 > const &&other) |
Assigns from std::pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1 const, U1 &> && std::is_assignable_v<T2 const, U2 &>) | |
constexpr common_pair const & | operator= (std::pair< U1, U2 > &other) const |
Assigns from std::pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1 const, U1 const> && std::is_assignable_v<T2 const, U2 const>) | |
constexpr common_pair const & | operator= (std::pair< U1, U2 > const &other) const |
Assigns from std::pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1 const, U1> && std::is_assignable_v<T2 const, U2>) | |
constexpr common_pair const & | operator= (std::pair< U1, U2 > &&other) const |
Assigns from std::pair. | |
template<class U1 , class U2 > requires (std::is_assignable_v<T1 const, U1 const> && std::is_assignable_v<T2 const, U2 const>) | |
constexpr common_pair const & | operator= (std::pair< U1, U2 > const &&other) const |
Assigns from std::pair. | |
Conversion to std::pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<U1, T1 &> && std::is_constructible_v<U2, T2 &>) | |
operator std::pair< U1, U2 > () & | |
Converts to std::pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<U1, T1 const> && std::is_constructible_v<U2, T2 const>) | |
operator std::pair< U1, U2 > () const & | |
Converts to std::pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<U1, T1> && std::is_constructible_v<U2, T2>) | |
operator std::pair< U1, U2 > () && | |
Converts to std::pair. | |
template<class U1 , class U2 > requires (std::is_constructible_v<U1, T1 const> && std::is_constructible_v<U2, T2 const>) | |
operator std::pair< U1, U2 > () const && | |
Converts to std::pair. | |
![]() | |
T | operator= (T... args) |
T | pair (T... args) |
T | swap (T... args) |
Friends | |
Comparison operators (common_pair) | |
template<class U1 , class U2 > requires (std::equality_comparable_with<T1, U1> && std::equality_comparable_with<T2, U2>) | |
constexpr friend bool | operator== (common_pair const &lhs, common_pair< U1, U2 > const &rhs) |
Checks whether lhs and rhs are equal. More... | |
template<class U1 , class U2 > requires (std::equality_comparable_with<T1, U1> && std::equality_comparable_with<T2, U2>) | |
constexpr friend bool | operator!= (common_pair const &lhs, common_pair< U1, U2 > const &rhs) |
Checks whether lhs and rhs are unequal. More... | |
template<class U1 , class U2 > requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>) | |
constexpr friend bool | operator< (common_pair const &lhs, common_pair< U1, U2 > const &rhs) |
Checks whether lhs is less than rhs . More... | |
template<class U1 , class U2 > requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>) | |
constexpr friend bool | operator<= (common_pair const &lhs, common_pair< U1, U2 > const &rhs) |
Checks whether lhs is less than or equal to rhs . More... | |
template<class U1 , class U2 > requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>) | |
constexpr friend bool | operator> (common_pair const &lhs, common_pair< U1, U2 > const &rhs) |
Checks whether lhs is greater than rhs . More... | |
template<class U1 , class U2 > requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>) | |
constexpr friend bool | operator>= (common_pair const &lhs, common_pair< U1, U2 > const &rhs) |
Checks whether lhs is greater than or equal to rhs . More... | |
template<class U1 , class U2 > requires (std::three_way_comparable_with<T1, U1> && std::three_way_comparable_with<T2, U2>) | |
constexpr friend std::common_comparison_category_t< std::compare_three_way_result_t< U1, T1 >, std::compare_three_way_result_t< U2, T2 > > | operator<=> (common_pair const &lhs, common_pair< U1, U2 > const &rhs) |
Performs a three-way comparison between lhs and rhs More... | |
Comparison operators (std::pair) | |
template<class U1 , class U2 > requires (std::equality_comparable_with<T1, U1> && std::equality_comparable_with<T2, U2>) | |
constexpr friend bool | operator== (common_pair const &lhs, std::pair< U1, U2 > const &rhs) |
Checks whether lhs and rhs are equal. More... | |
template<class U1 , class U2 > requires (std::equality_comparable_with<T1, U1> && std::equality_comparable_with<T2, U2>) | |
constexpr friend bool | operator!= (common_pair const &lhs, std::pair< U1, U2 > const &rhs) |
Checks whether lhs and rhs are unequal. More... | |
template<class U1 , class U2 > requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>) | |
constexpr friend bool | operator< (common_pair const &lhs, std::pair< U1, U2 > const &rhs) |
Checks whether lhs is less than rhs . More... | |
template<class U1 , class U2 > requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>) | |
constexpr friend bool | operator<= (common_pair const &lhs, std::pair< U1, U2 > const &rhs) |
Checks whether lhs is less than or equal to rhs . More... | |
template<class U1 , class U2 > requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>) | |
constexpr friend bool | operator> (common_pair const &lhs, std::pair< U1, U2 > const &rhs) |
Checks whether lhs is greater than rhs . More... | |
template<class U1 , class U2 > requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>) | |
constexpr friend bool | operator>= (common_pair const &lhs, std::pair< U1, U2 > const &rhs) |
Checks whether lhs is greater than or equal to rhs . More... | |
template<class U1 , class U2 > requires (std::three_way_comparable_with<T1, U1> && std::three_way_comparable_with<T2, U2>) | |
constexpr friend std::common_comparison_category_t< std::compare_three_way_result_t< U1, T1 >, std::compare_three_way_result_t< U2, T2 > > | operator<=> (common_pair const &lhs, std::pair< U1, U2 > const &rhs) |
Performs a three-way comparison between lhs and rhs More... | |
Additional Inherited Members | |
![]() | |
T | first |
T | second |
A std::pair implementation that incorporates most changes from C++23's standard library.
|
no-apidefault |
Defaulted.
|
no-apifriend |
Checks whether lhs
and rhs
are unequal.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A common_pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
and rhs
are unequal.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A std::pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
is less than rhs
.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A common_pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
is less than rhs
.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A std::pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
is less than or equal to rhs
.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A common_pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
is less than or equal to rhs
.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A std::pair with possibly different element types. |
|
no-apifriend |
Performs a three-way comparison between lhs
and rhs
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A common_pair with possibly different element types. |
|
no-apifriend |
Performs a three-way comparison between lhs
and rhs
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A std::pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
and rhs
are equal.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A common_pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
and rhs
are equal.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A std::pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
is greater than rhs
.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A common_pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
is greater than rhs
.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A std::pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
is greater than or equal to rhs
.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A common_pair with possibly different element types. |
|
no-apifriend |
Checks whether lhs
is greater than or equal to rhs
.
U1 | The type of the first element of rhs . Automatically deduced. |
U2 | The type of the second element of rhs . Automatically deduced. |
lhs | A common_pair. |
rhs | A std::pair with possibly different element types. |