A class that imitates std::pair<T, U>, but whose template arguments are homogeneous and the stored values ordered (.first < .second). More...
#include <OrderedPair.h>
| Public Types | |
| Types | |
| using | value_type = T | 
| Type of stored elements. | |
| using | iterator = T * | 
| Iterator type. | |
| using | const_iterator = const T * | 
| Const iterator type. | |
| Public Member Functions | |
| template<typename UnaryFunction > | |
| auto | map (UnaryFunction &&mapFunction) const | 
| Map the pair into an unordered std::pair. | |
| Constructors | |
| constexpr | OrderedPair ()=default | 
| Default constructor. | |
| constexpr | OrderedPair (T a, T b) | 
| Reordering pair initializer. | |
| Element access | |
| constexpr T | front () const | 
| constexpr T & | front () | 
| constexpr T | back () const | 
| constexpr T & | back () | 
| Iterators | |
| iterator | begin () | 
| iterator | end () | 
| const_iterator | begin () const | 
| const_iterator | end () const | 
| const_iterator | cbegin () const | 
| const_iterator | cend () const | 
| Operators | |
| constexpr auto | tie () const | 
| Yields the result of std::tie(first, second) | |
|  Public Member Functions inherited from Scine::Molassembler::Temple::Crtp::LexicographicComparable< OrderedPair< T > > | |
| constexpr bool | operator== (const LexicographicComparable &other) const | 
| constexpr bool | operator!= (const LexicographicComparable &other) const | 
| constexpr bool | operator< (const LexicographicComparable &other) const | 
| constexpr bool | operator<= (const LexicographicComparable &other) const | 
| constexpr bool | operator> (const LexicographicComparable &other) const | 
| constexpr bool | operator>= (const LexicographicComparable &other) const | 
| Data Fields | |
| State | |
| T | first | 
| First element of the pair. | |
| T | second | 
| Second element of the pair. | |
| Additional Inherited Members | |
|  Static Public Member Functions inherited from Scine::Molassembler::Temple::Crtp::LexicographicComparable< OrderedPair< T > > | |
| static constexpr const OrderedPair< T > & | getDerived (const LexicographicComparable &base) | 
A class that imitates std::pair<T, U>, but whose template arguments are homogeneous and the stored values ordered (.first < .second).