]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/icl/include/boost/icl/type_traits/is_asymmetric_interval.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / icl / include / boost / icl / type_traits / is_asymmetric_interval.hpp
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_TYPE_TRAITS_IS_ASYMMETRIC_INTERVAL_HPP_JOFA_100327
9 #define BOOST_ICL_TYPE_TRAITS_IS_ASYMMETRIC_INTERVAL_HPP_JOFA_100327
10
11 #include <boost/icl/type_traits/is_interval.hpp>
12
13 namespace boost{ namespace icl
14 {
15
16 template <class Type> struct is_asymmetric_interval
17 {
18 typedef is_asymmetric_interval<Type> type;
19 BOOST_STATIC_CONSTANT(bool,
20 value = (mpl::and_<
21 is_interval<Type>
22 , has_static_bounds<Type>
23 , has_asymmetric_bounds<Type>
24 >::value)
25 );
26 };
27
28 template <class Type> struct is_continuous_asymmetric
29 {
30 typedef is_continuous_asymmetric<Type> type;
31 BOOST_STATIC_CONSTANT(bool,
32 value = (mpl::and_<
33 is_asymmetric_interval<Type>
34 , is_continuous<typename domain_type_of<interval_traits<Type> >::type>
35 >::value)
36 );
37 };
38
39 template <class Type> struct is_discrete_asymmetric
40 {
41 typedef is_discrete_asymmetric<Type> type;
42 BOOST_STATIC_CONSTANT(bool,
43 value = (mpl::and_<
44 is_asymmetric_interval<Type>
45 , mpl::not_<is_continuous<typename domain_type_of<interval_traits<Type> >::type> >
46 >::value)
47 );
48 };
49
50 }} // namespace boost icl
51
52 #endif
53
54