Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / multi_index / detail / is_index_list.hpp
1 /* Copyright 2003-2013 Joaquin M Lopez Munoz.
2  * Distributed under the Boost Software License, Version 1.0.
3  * (See accompanying file LICENSE_1_0.txt or copy at
4  * http://www.boost.org/LICENSE_1_0.txt)
5  *
6  * See http://www.boost.org/libs/multi_index for library home page.
7  */
8
9 #ifndef BOOST_MULTI_INDEX_DETAIL_IS_INDEX_LIST_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_IS_INDEX_LIST_HPP
11
12 #if defined(_MSC_VER)
13 #pragma once
14 #endif
15
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/mpl/empty.hpp>
18 #include <boost/mpl/is_sequence.hpp>
19
20 namespace boost{
21
22 namespace multi_index{
23
24 namespace detail{
25
26 template<typename T>
27 struct is_index_list
28 {
29   BOOST_STATIC_CONSTANT(bool,mpl_sequence=mpl::is_sequence<T>::value);
30   BOOST_STATIC_CONSTANT(bool,non_empty=!mpl::empty<T>::value);
31   BOOST_STATIC_CONSTANT(bool,value=mpl_sequence&&non_empty);
32 };
33
34 } /* namespace multi_index::detail */
35
36 } /* namespace multi_index */
37
38 } /* namespace boost */
39
40 #endif