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_CONCEPT_COMPARABLE_HPP_JOFA_100921
9 #define BOOST_ICL_CONCEPT_COMPARABLE_HPP_JOFA_100921
11 #include <boost/utility/enable_if.hpp>
12 #include <boost/icl/type_traits/is_icl_container.hpp>
14 namespace boost{ namespace icl
17 //==============================================================================
18 //= Equivalences and Orderings<Comparable>
19 //==============================================================================
21 inline typename enable_if<is_icl_container<Type>, bool>::type
22 operator != (const Type& left, const Type& right)
23 { return !(left == right); }
26 inline typename enable_if<is_icl_container<Type>, bool>::type
27 operator > (const Type& left, const Type& right)
28 { return right < left; }
30 /** Partial ordering which is induced by Compare */
32 inline typename enable_if<is_icl_container<Type>, bool>::type
33 operator <= (const Type& left, const Type& right)
34 { return !(left > right); }
37 inline typename enable_if<is_icl_container<Type>, bool>::type
38 operator >= (const Type& left, const Type& right)
39 { return !(left < right); }
41 }} // namespace boost icl