#include <iostream>

struct cool_operator
{
    cool_operator() = default;
    cool_operator(int _n, bool b = false) : first(b), n(_n) {}

    bool first;

    bool operator <(int x) const
    {
        return first && (n < x);
    }
    
    int n;
};

cool_operator operator <(int x, cool_operator const &lhs)
{
    return cool_operator(lhs.n, x < lhs.n);
}

int main()
{
    cool_operator c(4);

    std::cout << std::boolalpha << (3 < c < 5); // true
}