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);
Compares two ranges for inequality.
Note
Ranges are compared by the values hold by range, not by
specifications of them for example
range(0, 4, 2) != range(0, 3, 2) returns false.
Return value¶
Whether lhs is not 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(0);
py::range<int> rhs(4, 0);
py::print(lhs != rhs);
}
Output:
false