/* * compare.hpp * * Created on: Apr 1, 2013 * Author: Jan Travnicek */ #ifndef COMPARE_HPP_ #define COMPARE_HPP_ namespace std { template<class T> struct compare { int operator()(T first, T second) const; }; template<> struct compare<bool> { int operator()(bool first, bool second) const { return first - second; } }; template<> struct compare<int> { int operator()(int first, int second) const { return first - second; } }; template<> struct compare<double> { int operator()(double first, double second) const { return first - second; } }; } /* namespace std */ #endif /* COMPARE_HPP_ */