]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/icl/include/boost/icl/concept/comparable.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / icl / include / boost / icl / concept / comparable.hpp
CommitLineData
7c673cae
FG
1/*-----------------------------------------------------------------------------+
2Copyright (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
10
11#include <boost/utility/enable_if.hpp>
12#include <boost/icl/type_traits/is_icl_container.hpp>
13
14namespace boost{ namespace icl
15{
16
17//==============================================================================
18//= Equivalences and Orderings<Comparable>
19//==============================================================================
20template<class Type>
21inline typename enable_if<is_icl_container<Type>, bool>::type
22operator != (const Type& left, const Type& right)
23{ return !(left == right); }
24
25template<class Type>
26inline typename enable_if<is_icl_container<Type>, bool>::type
27operator > (const Type& left, const Type& right)
28{ return right < left; }
29
30/** Partial ordering which is induced by Compare */
31template<class Type>
32inline typename enable_if<is_icl_container<Type>, bool>::type
33operator <= (const Type& left, const Type& right)
34{ return !(left > right); }
35
36template<class Type>
37inline typename enable_if<is_icl_container<Type>, bool>::type
38operator >= (const Type& left, const Type& right)
39{ return !(left < right); }
40
41}} // namespace boost icl
42
43#endif
44
45