summaryrefslogblamecommitdiff
path: root/src/generic/operators.hpp
blob: 3d3dccda31b561c3f3a246e228a08b0a1b0dc99c (plain) (tree)
1
2

                                  











































                                  
                                    
#ifndef TMWA_GENERIC_OPERATORS_HPP
#define TMWA_GENERIC_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 // TMWA_GENERIC_OPERATORS_HPP