2011-09-01 02:48:32 +00:00
|
|
|
#ifndef SPROUT_DETAIL_FUNCTIONAL_HPP
|
|
|
|
#define SPROUT_DETAIL_FUNCTIONAL_HPP
|
|
|
|
|
|
|
|
#include <functional>
|
|
|
|
#include <sprout/config.hpp>
|
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
namespace detail {
|
2011-10-21 11:36:19 +00:00
|
|
|
//
|
|
|
|
// equal_to
|
|
|
|
//
|
|
|
|
template<typename T>
|
|
|
|
class equal_to
|
|
|
|
: public std::binary_function<T, T, bool>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SPROUT_CONSTEXPR bool operator()(T const& lhs, T const& rhs) const {
|
|
|
|
return lhs == rhs;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-09-01 02:48:32 +00:00
|
|
|
//
|
|
|
|
// less
|
|
|
|
//
|
|
|
|
template<typename T>
|
|
|
|
class less
|
|
|
|
: public std::binary_function<T, T, bool>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SPROUT_CONSTEXPR bool operator()(T const& lhs, T const& rhs) const {
|
|
|
|
return lhs < rhs;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
} // namespace detail
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_DETAIL_FUNCTIONAL_HPP
|