![]() |
Home | Libraries | People | FAQ | More |
The TR1 Tuple provides the standard boolean relational operators.
Notation
T1
... TN,
U1 ...
UNP1
... PNTi,
Uiith element
of a tuple
Piith parameter
template<typename T1, typename T2, ..., typename TN, typename U1, typename U2, ..., typename UN> bool operator==( const tuple<T1, T2, ..., TN>& lhs, const tuple<U1, U2, ..., UN>& rhs);
Requirements: For all i,
1 <=
i <
N,
is a valid expression returning a type that is convertible to get<i>(lhs) == get<i>(rhs)bool.
Semantics: Returns true
if and only if
for all get<i>(lhs) == get<i>(rhs)i. For any 2 zero
length tuples e and f, e
== f
returns true.
template<typename T1, typename T2, ..., typename TN, typename U1, typename U2, ..., typename UN> bool operator<( const tuple<T1, T2, ..., TN>& lhs, const tuple<U1, U2, ..., UN>& rhs);
Requirements: For all i,
1 <=
i <
N,
is a valid expression returning a type that is convertible to get<i>(lhs) < get<i>(rhs)bool.
Semantics: Returns the lexicographical
comparison of between lhs
and rhs.
template<typename T1, typename T2, ..., typename TN, typename U1, typename U2, ..., typename UN> bool operator!=( const tuple<T1, T2, ..., TN>& lhs, const tuple<U1, U2, ..., UN>& rhs);
Requirements: For all i,
1 <=
i <
N,
is a valid expression returning a type that is convertible to get<i>(lhs) == get<i>(rhs)bool.
Semantics: Returns !(lhs == rhs).
template<typename T1, typename T2, ..., typename TN, typename U1, typename U2, ..., typename UN> bool operator<=( const tuple<T1, T2, ..., TN>& lhs, const tuple<U1, U2, ..., UN>& rhs);
Requirements: For all i,
1 <=
i <
N,
is a valid expression returning a type that is convertible to get<i>(rhs) < get<i>(lhs)bool.
Semantics: Returns !(rhs < lhs)
template<typename T1, typename T2, ..., typename TN, typename U1, typename U2, ..., typename UN> bool operator>( const tuple<T1, T2, ..., TN>& lhs, const tuple<U1, U2, ..., UN>& rhs);
Requirements: For all i,
1 <=
i <
N,
is a valid expression returning a type that is convertible to get<i>(rhs) < get<i>(lhs)bool.
Semantics: Returns rhs
< lhs.
template<typename T1, typename T2, ..., typename TN, typename U1, typename U2, ..., typename UN> bool operator>=( const tuple<T1, T2, ..., TN>& lhs, const tuple<U1, U2, ..., UN>& rhs);
Requirements: For all i,
1 <=
i <
N,
is a valid expression returning a type that is convertible to get<i>(lhs) < get<i>(rhs)bool.
Semantics: Returns !(lhs < rhs).
| Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger |