py::builtins::operator <= (py::builtins::range)¶
Defined in <pypp/builtins/range.hpp>
template <class type>
constexpr bool operator <= (const range<type>& lhs, const range<type>& rhs);
Checks whether a range is less than or equal to another range.
Note
Ranges are compared by the values hold by range, not by specifications of them.
Return value¶
Whether lhs is less than or equal to rhs.
Complexity¶
\(O(n)\), where n = py::min(lhs.size(), rhs.size()).
Example¶
#include <pypp/builtins/range.hpp>
#include <pypp/builtins/print.hpp>
int main()
{
py::range<int> lhs(9);
py::range<int> rhs(10);
py::print(lhs <= rhs);
}
Output:
true