]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/icl/include/boost/icl/type_traits/interval_type_default.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / icl / include / boost / icl / type_traits / interval_type_default.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_INTERVAL_TYPE_DEFAULT_HPP_JOFA_100403
9 #define BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_DEFAULT_HPP_JOFA_100403
10
11 #include <boost/mpl/if.hpp>
12 #include <boost/icl/detail/design_config.hpp>
13 #include <boost/icl/continuous_interval.hpp>
14 #include <boost/icl/discrete_interval.hpp>
15 #include <boost/icl/right_open_interval.hpp>
16 #include <boost/icl/left_open_interval.hpp>
17 #include <boost/icl/closed_interval.hpp>
18 #include <boost/icl/open_interval.hpp>
19 #include <boost/icl/type_traits/is_continuous.hpp>
20 #include <boost/icl/type_traits/is_discrete.hpp>
21
22 namespace boost{ namespace icl
23 {
24
25 template <class DomainT, ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT)>
26 struct interval_type_default
27 {
28 #ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
29 typedef
30 typename mpl::if_< is_discrete<DomainT>
31 # ifdef BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT
32 , BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT<DomainT,Compare>
33 # else
34 , right_open_interval<DomainT,Compare>
35 # endif
36
37 # ifdef BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT
38 , BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT<DomainT,Compare>
39 # else
40 , right_open_interval<DomainT,Compare>
41 # endif
42 >::type type;
43 #else
44 typedef
45 typename mpl::if_< is_discrete<DomainT>
46 , discrete_interval<DomainT,Compare>
47 , continuous_interval<DomainT,Compare> >::type type;
48 #endif
49 };
50
51 }} // namespace boost icl
52
53 #endif
54
55