forked from boostorg/tuple
Definitions now in tuples subnamespace
[SVN r11052]
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace tuples {
|
||||
|
||||
inline bool operator==(const null_type&, const null_type&) { return true; }
|
||||
inline bool operator>=(const null_type&, const null_type&) { return true; }
|
||||
@@ -48,7 +49,6 @@ inline bool operator>(const null_type&, const null_type&) { return false; }
|
||||
|
||||
|
||||
namespace detail {
|
||||
namespace tuples {
|
||||
// comparison operators check statically the length of its operands and
|
||||
// delegate the comparing task to the following functions. Hence
|
||||
// the static check is only made once (should help the compiler).
|
||||
@@ -107,7 +107,6 @@ inline bool gte(const T1& lhs, const T2& rhs) {
|
||||
template<>
|
||||
inline bool gte<null_type,null_type>(const null_type&, const null_type&) { return true; }
|
||||
|
||||
} // end of namespace tuples
|
||||
} // end of namespace detail
|
||||
|
||||
|
||||
@@ -119,7 +118,7 @@ inline bool operator==(const cons<T1, T2>& lhs, const cons<S1, S2>& rhs)
|
||||
// check that tuple_lengths are equal
|
||||
BOOST_STATIC_ASSERT(tuple_length<T2>::value == tuple_length<S2>::value);
|
||||
|
||||
return detail::tuples::eq(lhs, rhs);
|
||||
return detail::eq(lhs, rhs);
|
||||
}
|
||||
|
||||
// not equal -----
|
||||
@@ -131,7 +130,7 @@ inline bool operator!=(const cons<T1, T2>& lhs, const cons<S1, S2>& rhs)
|
||||
// check that tuple_lengths are equal
|
||||
BOOST_STATIC_ASSERT(tuple_length<T2>::value == tuple_length<S2>::value);
|
||||
|
||||
return detail::tuples::neq(lhs, rhs);
|
||||
return detail::neq(lhs, rhs);
|
||||
}
|
||||
|
||||
// <
|
||||
@@ -141,7 +140,7 @@ inline bool operator<(const cons<T1, T2>& lhs, const cons<S1, S2>& rhs)
|
||||
// check that tuple_lengths are equal
|
||||
BOOST_STATIC_ASSERT(tuple_length<T2>::value == tuple_length<S2>::value);
|
||||
|
||||
return detail::tuples::lt(lhs, rhs);
|
||||
return detail::lt(lhs, rhs);
|
||||
}
|
||||
|
||||
// >
|
||||
@@ -151,7 +150,7 @@ inline bool operator>(const cons<T1, T2>& lhs, const cons<S1, S2>& rhs)
|
||||
// check that tuple_lengths are equal
|
||||
BOOST_STATIC_ASSERT(tuple_length<T2>::value == tuple_length<S2>::value);
|
||||
|
||||
return detail::tuples::gt(lhs, rhs);
|
||||
return detail::gt(lhs, rhs);
|
||||
}
|
||||
|
||||
// <=
|
||||
@@ -161,7 +160,7 @@ inline bool operator<=(const cons<T1, T2>& lhs, const cons<S1, S2>& rhs)
|
||||
// check that tuple_lengths are equal
|
||||
BOOST_STATIC_ASSERT(tuple_length<T2>::value == tuple_length<S2>::value);
|
||||
|
||||
return detail::tuples::lte(lhs, rhs);
|
||||
return detail::lte(lhs, rhs);
|
||||
}
|
||||
|
||||
// >=
|
||||
@@ -171,9 +170,10 @@ inline bool operator>=(const cons<T1, T2>& lhs, const cons<S1, S2>& rhs)
|
||||
// check that tuple_lengths are equal
|
||||
BOOST_STATIC_ASSERT(tuple_length<T2>::value == tuple_length<S2>::value);
|
||||
|
||||
return detail::tuples::gte(lhs, rhs);
|
||||
return detail::gte(lhs, rhs);
|
||||
}
|
||||
|
||||
} // end of namespace tuples
|
||||
} // end of namespace boost
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user