29 template <
typename T1,
typename T2>
62 :
first(std::forward<T1>(other.first)),
63 second(std::forward<T2>(other.second)) {}
81 first = std::forward<T1>(other.first);
82 second = std::forward<T2>(other.second);
108 template <
typename T1,
typename T2>
110 return Pair<T1, T2>(std::forward<T1>(first), std::forward<T2>(second));
114 template <
typename T1,
typename T2>
119 template <
typename T1,
typename T2>
121 return !(lhs == rhs);
124 template <
typename T1,
typename T2>
131 template <
typename T1,
typename T2>
136 template <
typename T1,
typename T2>
141 template <
typename T1,
typename T2>
A simple container for storing two values as a pair.
Pair & operator=(Pair &&other) noexcept
Move assignment operator.
Pair(Pair &&other) noexcept
Move constructor.
Pair & operator=(const Pair &other)=default
Copy assignment operator.
Pair(const Pair &other)=default
Copy constructor.
Pair(const T1 &first, const T2 &second)
Constructor with initial values.
Pair()=default
Default constructor.
void swap(Pair &other) noexcept
Swaps the contents of this Pair with another Pair.
Root namespace for everything the engine exposes.
bool operator<(const Pair< T1, T2 > &lhs, const Pair< T1, T2 > &rhs)
Pair< T1, T2 > makePair(T1 &&first, T2 &&second)
Creates a Pair object with the given values.
bool operator>(const Pair< T1, T2 > &lhs, const Pair< T1, T2 > &rhs)
bool operator<=(const Pair< T1, T2 > &lhs, const Pair< T1, T2 > &rhs)
bool operator>=(const Pair< T1, T2 > &lhs, const Pair< T1, T2 > &rhs)
bool operator!=(const Pair< T1, T2 > &lhs, const Pair< T1, T2 > &rhs)
bool operator==(const Pair< T1, T2 > &lhs, const Pair< T1, T2 > &rhs)