summaryrefslogblamecommitdiff
path: root/src/common/operators.hpp
blob: 3d44b81747e7590f8cebcd3c8bf0ea70d3108ed8 (plain) (tree)














































                                  
#ifndef OPERATORS_HPP
#define OPERATORS_HPP

namespace _operators
{
    class Comparable {};

    template<class T>
    bool operator == (T l, T r)
    {
        return l.value == r.value;
    }

    template<class T>
    bool operator != (T l, T r)
    {
        return l.value != r.value;
    }

    template<class T>
    bool operator < (T l, T r)
    {
        return l.value < r.value;
    }

    template<class T>
    bool operator <= (T l, T r)
    {
        return l.value <= r.value;
    }

    template<class T>
    bool operator > (T l, T r)
    {
        return l.value > r.value;
    }

    template<class T>
    bool operator >= (T l, T r)
    {
        return l.value >= r.value;
    }
}

using _operators::Comparable;

#endif // OPERATORS_HPP