Struct for holding a pair of values.
More...
#include <pair.h>
template<typename TypeT0, typename TypeT1>
struct fennec::pair< TypeT0, TypeT1 >
- Template Parameters
-
| TypeT0 | The type of the first value |
| TypeT1 | The type of the second value |
|
|
|
constexpr | pair ()=default |
| | Default Constructor, invokes default constructor for both elements.
|
| |
|
constexpr | ~pair ()=default |
| | Destructor, invokes destructor for both elements.
|
| |
| constexpr | pair (const TypeT0 &x, const TypeT1 &y) |
| | Pair Copy Constructor.
|
| |
| constexpr | pair (TypeT0 &&x, TypeT1 &&y) noexcept |
| | Pair Move Constructor.
|
| |
| template<typename Arg1T , typename Arg2T > |
| constexpr | pair (Arg1T &&arg1, Arg2T &&arg2) |
| | Pair Implicit Constructor.
|
| |
|
constexpr | pair (const pair &pair) |
| | Copy Constructor, copies both elements.
|
| |
|
constexpr | pair (pair &&pair) noexcept |
| | Move Constructor, moves both elements.
|
| |
|
constexpr pair & | operator= (const pair &pair) |
| | Copy Assignment, copies both elements.
|
| |
|
constexpr pair & | operator= (pair &&pair) |
| | Move Assignment, moves both elements.
|
| |
|
| constexpr bool | operator== (const pair &p) const |
| | Equality Operator.
|
| |
| constexpr bool | operator!= (const pair &p) const |
| | Inequality Operator.
|
| |
| constexpr bool | operator< (const pair &p) const |
| | Less Than Operator.
|
| |
| constexpr bool | operator<= (const pair &p) const |
| | Less Equal Operator.
|
| |
| constexpr bool | operator> (const pair &p) const |
| | Greater Than Operator.
|
| |
| constexpr bool | operator>= (const pair &p) const |
| | Greater Equal Operator.
|
| |
|
|
TypeT0 | first |
| | The first value in the pair.
|
| |
|
TypeT1 | second |
| | The second value in the pair.
|
| |
◆ pair() [1/3]
template<typename TypeT0 , typename TypeT1 >
| constexpr fennec::pair< TypeT0, TypeT1 >::pair |
( |
const TypeT0 & |
x, |
|
|
const TypeT1 & |
y |
|
) |
| |
|
inlineconstexpr |
- Parameters
-
| x | Value to copy for the first element |
| y | Value to copy for the first element |
◆ pair() [2/3]
template<typename TypeT0 , typename TypeT1 >
| constexpr fennec::pair< TypeT0, TypeT1 >::pair |
( |
TypeT0 && |
x, |
|
|
TypeT1 && |
y |
|
) |
| |
|
inlineconstexprnoexcept |
- Parameters
-
| x | Value to move for the first element |
| y | Value to move for the first element |
◆ pair() [3/3]
template<typename TypeT0 , typename TypeT1 >
template<typename Arg1T , typename Arg2T >
| constexpr fennec::pair< TypeT0, TypeT1 >::pair |
( |
Arg1T && |
arg1, |
|
|
Arg2T && |
arg2 |
|
) |
| |
|
inlineconstexpr |
- Parameters
-
| arg1 | Value to initialize the first element |
| arg2 | Value to initialize the first element |
◆ operator==()
template<typename TypeT0 , typename TypeT1 >
| constexpr bool fennec::pair< TypeT0, TypeT1 >::operator== |
( |
const pair< TypeT0, TypeT1 > & |
p | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
true when both elements of each pair are equal
◆ operator!=()
template<typename TypeT0 , typename TypeT1 >
| constexpr bool fennec::pair< TypeT0, TypeT1 >::operator!= |
( |
const pair< TypeT0, TypeT1 > & |
p | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
true when either element of each pair are equal
◆ operator<()
template<typename TypeT0 , typename TypeT1 >
| constexpr bool fennec::pair< TypeT0, TypeT1 >::operator< |
( |
const pair< TypeT0, TypeT1 > & |
p | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
- lexical comparison of both elements, i.e. returns
true when the first element is less, or they are equal and the second element is less
◆ operator<=()
template<typename TypeT0 , typename TypeT1 >
| constexpr bool fennec::pair< TypeT0, TypeT1 >::operator<= |
( |
const pair< TypeT0, TypeT1 > & |
p | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
- lexical comparison of both elements, i.e. returns
true when the first element is less, or they are equal and the second element is less or equal
◆ operator>()
template<typename TypeT0 , typename TypeT1 >
| constexpr bool fennec::pair< TypeT0, TypeT1 >::operator> |
( |
const pair< TypeT0, TypeT1 > & |
p | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
- lexical comparison of both elements, i.e. returns
true when the first element is greater, or they are equal and the second element is greater
◆ operator>=()
template<typename TypeT0 , typename TypeT1 >
| constexpr bool fennec::pair< TypeT0, TypeT1 >::operator>= |
( |
const pair< TypeT0, TypeT1 > & |
p | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
- lexical comparison of both elements, i.e. returns
true when the first element is greater, or they are equal and the second element is greater or equal
The documentation for this struct was generated from the following file:
- include/fennec/containers/pair.h