is_increasing.hpp 978 B

12345678910111213141516171819202122232425262728293031323334
  1. /*-----------------------------------------------------------------------------+
  2. Copyright (c) 2011-2011: Joachim Faulhaber
  3. +------------------------------------------------------------------------------+
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENCE.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. +-----------------------------------------------------------------------------*/
  8. #ifndef BOOST_ICL_TYPE_TRAITS_IS_INCREASING_HPP_JOFA_110416
  9. #define BOOST_ICL_TYPE_TRAITS_IS_INCREASING_HPP_JOFA_110416
  10. #include <functional>
  11. namespace boost{ namespace icl
  12. {
  13. template <class DomainT, class Compare>
  14. struct is_increasing
  15. {
  16. typedef is_increasing type;
  17. BOOST_STATIC_CONSTANT(bool, value = true);
  18. };
  19. template <class DomainT>
  20. struct is_increasing<DomainT, std::greater<DomainT> >
  21. {
  22. typedef is_increasing type;
  23. BOOST_STATIC_CONSTANT(bool, value = false);
  24. };
  25. }} // namespace boost icl
  26. #endif