.. _sprout-array-array-operator-less_equal: ############################################################################### operator<= ############################################################################### Interface ======================================== .. sourcecode:: c++ template inline SPROUT_CONSTEXPR bool operator<=(sprout::array const& lhs, sprout::array const& rhs); Returns ======================================== | true if the contents of the lhs are lexicographically less than or equal the contents of rhs, false otherwise. Examples ======================================== .. sourcecode:: c++ #include using namespace sprout; SPROUT_STATIC_CONSTEXPR auto x = array{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; SPROUT_STATIC_CONSTEXPR auto y = array{{10, 9, 8, 7, 6, 5, 4, 3, 2, 1}}; static_assert(x <= y, "x is less than or equal to y."); Complexity ======================================== | Recursive function invocations in *O(logN)* (logarithmic) depth. Header ======================================== | ``sprout/array/comparison.hpp`` | Convenience header: ``sprout/array.hpp``