...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
Lexicographically compare two sequences.
template <typename Seq1, typename Seq2> bool operator<=(Seq1 const& a, Seq2 const& b);
a <= b
For each element,
a, and for
a < b is a valid expression returning a
type that is convertible to bool.
An attempt to compare two Sequences of different lengths results in a compile time error.
Semantics: Returns !(b < a).
#include <boost/fusion/sequence/comparison/less_equal.hpp> #include <boost/fusion/include/less_equal.hpp>
vector<int, float> v1(4, 3.3f);
vector<short, float> v2(5, 3.3f);
vector<long, double> v3(5, 4.4); assert(v1 <= v2); assert(v2 <= v3);