SeqAn3 3.2.0
The Modern C++ library for sequence analysis.
seqan3::common_pair< T1, T2 > Struct Template Reference

A std::pair implementation that incorporates most changes from C++23's standard library. More...

#include <seqan3/utility/tuple/common_pair.hpp>

+ Inheritance diagram for seqan3::common_pair< T1, T2 >:

Public Member Functions

Default constructors and assignments.
 common_pair ()=default
 Defaulted.
 
 common_pair (common_pair const &)=default
 Defaulted.
 
common_pairoperator= (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_pairoperator= (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_pairoperator= (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_pairoperator= (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_pairoperator= (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_pairoperator= (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_pairoperator= (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_pairoperator= (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_pairoperator= (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.
 
- Public Member Functions inherited from std::pair< T1, T2 >
operator= (T... args)
 
pair (T... args)
 
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

- Public Attributes inherited from std::pair< T1, T2 >
first
 
second
 

Detailed Description

template<class T1, class T2>
struct seqan3::common_pair< T1, T2 >

A std::pair implementation that incorporates most changes from C++23's standard library.

Constructor & Destructor Documentation

◆ ~common_pair()

template<class T1 , class T2 >
seqan3::common_pair< T1, T2 >::~common_pair ( )
default

Defaulted.

Friends And Related Function Documentation

◆ operator!= [1/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::equality_comparable_with<T1, U1> && std::equality_comparable_with<T2, U2>)
constexpr friend bool operator!= ( common_pair< T1, T2 > const &  lhs,
common_pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs and rhs are unequal.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA common_pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator!= [2/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::equality_comparable_with<T1, U1> && std::equality_comparable_with<T2, U2>)
constexpr friend bool operator!= ( common_pair< T1, T2 > const &  lhs,
std::pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs and rhs are unequal.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA std::pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator< [1/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>)
constexpr friend bool operator< ( common_pair< T1, T2 > const &  lhs,
common_pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs is less than rhs.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA common_pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator< [2/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>)
constexpr friend bool operator< ( common_pair< T1, T2 > const &  lhs,
std::pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs is less than rhs.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA std::pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator<= [1/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>)
constexpr friend bool operator<= ( common_pair< T1, T2 > const &  lhs,
common_pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs is less than or equal to rhs.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA common_pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator<= [2/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>)
constexpr friend bool operator<= ( common_pair< T1, T2 > const &  lhs,
std::pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs is less than or equal to rhs.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA std::pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator<=> [1/2]

template<class T1 , class T2 >
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< T1, T2 > const &  lhs,
common_pair< U1, U2 > const &  rhs 
)
friend

Performs a three-way comparison between lhs and rhs

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA common_pair with possibly different element types.
Returns
An ordering indicating the result of the comparison.

◆ operator<=> [2/2]

template<class T1 , class T2 >
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< T1, T2 > const &  lhs,
std::pair< U1, U2 > const &  rhs 
)
friend

Performs a three-way comparison between lhs and rhs

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA std::pair with possibly different element types.
Returns
An ordering indicating the result of the comparison.

◆ operator== [1/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::equality_comparable_with<T1, U1> && std::equality_comparable_with<T2, U2>)
constexpr friend bool operator== ( common_pair< T1, T2 > const &  lhs,
common_pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs and rhs are equal.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA common_pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator== [2/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::equality_comparable_with<T1, U1> && std::equality_comparable_with<T2, U2>)
constexpr friend bool operator== ( common_pair< T1, T2 > const &  lhs,
std::pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs and rhs are equal.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA std::pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator> [1/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>)
constexpr friend bool operator> ( common_pair< T1, T2 > const &  lhs,
common_pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs is greater than rhs.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA common_pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator> [2/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>)
constexpr friend bool operator> ( common_pair< T1, T2 > const &  lhs,
std::pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs is greater than rhs.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA std::pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator>= [1/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>)
constexpr friend bool operator>= ( common_pair< T1, T2 > const &  lhs,
common_pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs is greater than or equal to rhs.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA common_pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

◆ operator>= [2/2]

template<class T1 , class T2 >
template<class U1 , class U2 >
requires (std::totally_ordered_with<T1, U1> && std::totally_ordered_with<T2, U2>)
constexpr friend bool operator>= ( common_pair< T1, T2 > const &  lhs,
std::pair< U1, U2 > const &  rhs 
)
friend

Checks whether lhs is greater than or equal to rhs.

Template Parameters
U1The type of the first element of rhs. Automatically deduced.
U2The type of the second element of rhs. Automatically deduced.
Parameters
lhsA common_pair.
rhsA std::pair with possibly different element types.
Returns
A bool indicating the result of the comparison.

The documentation for this struct was generated from the following file: