]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*-----------------------------------------------------------------------------+ |
2 | Copyright (c) 2008-2009: 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_INTERVAL_CONTAINER_HPP_JOFA_081004 | |
9 | #define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_CONTAINER_HPP_JOFA_081004 | |
10 | ||
11 | #include <boost/mpl/and.hpp> | |
12 | #include <boost/mpl/not.hpp> | |
13 | #include <boost/icl/type_traits/is_map.hpp> | |
14 | ||
15 | namespace boost{ namespace icl | |
16 | { | |
17 | template <class Type> struct is_interval_container | |
18 | { | |
19 | typedef is_interval_container<Type> type; | |
20 | BOOST_STATIC_CONSTANT(bool, value = false); | |
21 | }; | |
22 | ||
23 | template<class Type> | |
24 | struct is_interval_map | |
25 | { | |
26 | typedef is_interval_map<Type> type; | |
27 | BOOST_STATIC_CONSTANT(bool, value = | |
28 | (mpl::and_<is_interval_container<Type>, is_map<Type> >::value) | |
29 | ); | |
30 | }; | |
31 | ||
32 | template<class Type> | |
33 | struct is_interval_set | |
34 | { | |
35 | typedef is_interval_set<Type> type; | |
36 | BOOST_STATIC_CONSTANT(bool, value = | |
37 | (mpl::and_< is_interval_container<Type>, | |
38 | mpl::not_<is_interval_map<Type> > >::value) | |
39 | ); | |
40 | }; | |
41 | ||
42 | ||
43 | }} // namespace boost icl | |
44 | ||
45 | #endif | |
46 | ||
47 |