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
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>
18 namespace boost{ namespace icl
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)
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> > >
42 struct is_element_container
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)
49 }} // namespace boost icl