26 #ifndef MLN_UTIL_ORD_PAIR_HH
27 # define MLN_UTIL_ORD_PAIR_HH
33 # include <mln/core/concept/object.hh>
34 # include <mln/util/ord.hh>
54 ord_pair(
const T& val1,
const T& val2);
59 const T&
first()
const;
102 template <
typename T>
106 template <
typename T>
107 std::ostream& operator<<(std::ostream& ostr, const ord_pair<T>& op);
115 template <
typename T>
120 # ifndef MLN_INCLUDE_ONLY
129 template <
typename T>
135 template <
typename T>
139 change_both(val1, val2);
146 template <
typename T>
154 template <
typename T>
162 template <
typename T>
170 template <
typename T>
178 template <
typename T>
193 template <
typename T>
208 template <
typename T>
230 template <
typename T>
232 bool operator==(
const ord_pair<T>& lhs,
const ord_pair<T>&
rhs)
234 return lhs.first() == rhs.first() && lhs.second() == rhs.second();
237 template <
typename T>
239 bool operator< (const ord_pair<T>& lhs,
const ord_pair<T>&
rhs)
243 (lhs.first() == rhs.first() &&
247 template <
typename T>
249 bool operator<=(const ord_pair<T>& lhs,
const ord_pair<T>&
rhs)
253 (lhs.first() == rhs.first() &&
261 template <
typename T>
263 std::ostream& operator<<(std::ostream& ostr, const ord_pair<T>& op)
265 return ostr <<
'(' << op.first() <<
',' << op.second() <<
')';
274 template <
typename T>
279 util::ord_pair<T> tmp(val1, val2);
285 # endif // ! MLN_INCLUDE_ONLY
290 #endif // ! MLN_UTIL_ORD_PAIR_HH