11 #ifndef INCLUDE_MOLASSEMBLER_TEMPLE_ORDERED_PAIR_H
12 #define INCLUDE_MOLASSEMBLER_TEMPLE_ORDERED_PAIR_H
21 namespace Molassembler {
70 constexpr T front()
const {
74 constexpr T& front() {
78 constexpr T back()
const {
102 return std::next(&
second);
110 return std::next(&
second);
117 constexpr
auto tie()
const {
123 template<
typename UnaryFunction>
124 auto map(UnaryFunction&& mapFunction)
const {
125 return std::make_pair(
T * iterator
Iterator type.
Definition: OrderedPair.h:42
Generates all operators using a method returning a tuple.
Definition: OperatorSuppliers.h:78
Operator-supplying CRTP base classes.
Encompasses the orientation of a shape along a fused bond.
Definition: Composites.h:56
A class that imitates std::pair<T, U>, but whose template arguments are homogeneous and the stored va...
Definition: OrderedPair.h:36
constexpr OrderedPair()=default
Default constructor.
T second
Second element of the pair.
Definition: OrderedPair.h:52
T first
First element of the pair.
Definition: OrderedPair.h:50
constexpr auto tie() const
Yields the result of std::tie(first, second)
Definition: OrderedPair.h:117
constexpr OrderedPair(T a, T b)
Reordering pair initializer.
Definition: OrderedPair.h:61
auto map(UnaryFunction &&mapFunction) const
Map the pair into an unordered std::pair.
Definition: OrderedPair.h:124
const T * const_iterator
Const iterator type.
Definition: OrderedPair.h:44