exclusive_less_than.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. /*-----------------------------------------------------------------------------+
  2. Copyright (c) 2010-2010: 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_DETAIL_EXCLUSIVE_LESS_THAN_HPP_JOFA_100929
  9. #define BOOST_ICL_DETAIL_EXCLUSIVE_LESS_THAN_HPP_JOFA_100929
  10. #include <boost/icl/concept/interval.hpp>
  11. namespace boost{ namespace icl
  12. {
  13. /// Comparison functor on intervals implementing an overlap free less
  14. template <class IntervalT>
  15. struct exclusive_less_than
  16. {
  17. /** Operator <tt>operator()</tt> implements a strict weak ordering on intervals. */
  18. bool operator()(const IntervalT& left, const IntervalT& right)const
  19. {
  20. return icl::non_empty::exclusive_less(left, right);
  21. }
  22. };
  23. }} // namespace boost icl
  24. #endif