]>
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_ELEMENT_CONTAINER_HPP_JOFA_090830 | |
9 | #define BOOST_ICL_TYPE_TRAITS_IS_ELEMENT_CONTAINER_HPP_JOFA_090830 | |
10 | ||
11 | #include <boost/mpl/and.hpp> | |
12 | #include <boost/mpl/or.hpp> | |
13 | #include <boost/mpl/not.hpp> | |
14 | #include <boost/icl/type_traits/is_container.hpp> | |
15 | #include <boost/icl/type_traits/is_interval_container.hpp> | |
16 | #include <boost/icl/type_traits/is_set.hpp> | |
17 | ||
18 | namespace boost{ namespace icl | |
19 | { | |
20 | template<class Type> | |
21 | struct is_element_map | |
22 | { | |
23 | typedef is_element_map<Type> type; | |
24 | BOOST_STATIC_CONSTANT(bool, value = | |
25 | (mpl::and_<is_map<Type>, mpl::not_<is_interval_container<Type> > >::value) | |
26 | ); | |
27 | }; | |
28 | ||
29 | template<class Type> | |
30 | struct is_element_set | |
31 | { | |
32 | typedef is_element_set<Type> type; | |
33 | BOOST_STATIC_CONSTANT(bool, value = | |
34 | (mpl::or_< mpl::and_< is_set<Type> | |
35 | , mpl::not_<is_interval_container<Type> > > | |
36 | , is_std_set<Type> | |
37 | >::value) | |
38 | ); | |
39 | }; | |
40 | ||
41 | template <class Type> | |
42 | struct is_element_container | |
43 | { | |
44 | typedef is_element_container<Type> type; | |
45 | BOOST_STATIC_CONSTANT(bool, value = | |
46 | (mpl::or_<is_element_set<Type>, is_element_map<Type> >::value) | |
47 | ); | |
48 | }; | |
49 | }} // namespace boost icl | |
50 | ||
51 | #endif | |
52 | ||
53 |