1 /* Copyright 2003-2007 Joaquín M López Muñoz.
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)
6 * See http://www.boost.org/libs/multi_index for library home page.
9 #ifndef BOOST_MULTI_INDEX_DETAIL_NODE_TYPE_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_NODE_TYPE_HPP
12 #if defined(_MSC_VER)&&(_MSC_VER>=1200)
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/detail/workaround.hpp>
18 #include <boost/mpl/bind.hpp>
19 #include <boost/mpl/reverse_iter_fold.hpp>
20 #include <boost/mpl/deref.hpp>
21 #include <boost/multi_index_container_fwd.hpp>
22 #include <boost/multi_index/detail/header_holder.hpp>
23 #include <boost/multi_index/detail/index_node_base.hpp>
24 #include <boost/multi_index/detail/is_index_list.hpp>
25 #include <boost/multi_index/detail/msvc_index_specifier.hpp>
26 #include <boost/static_assert.hpp>
30 namespace multi_index{
34 /* MPL machinery to construct the internal node type associated to an
38 #if BOOST_WORKAROUND(BOOST_MSVC,<1310)
39 struct index_node_applier
41 template<typename IndexSpecifierIterator,typename Super>
43 msvc_index_specifier< mpl::deref<IndexSpecifierIterator>::type >::
44 template result_node_class<Super>
49 struct index_node_applier
51 template<typename IndexSpecifierIterator,typename Super>
54 typedef typename mpl::deref<IndexSpecifierIterator>::type index_specifier;
55 typedef typename index_specifier::
56 BOOST_NESTED_TEMPLATE node_class<Super>::type type;
61 template<typename Value,typename IndexSpecifierList,typename Allocator>
62 struct multi_index_node_type
64 BOOST_STATIC_ASSERT(detail::is_index_list<IndexSpecifierList>::value);
66 typedef typename mpl::reverse_iter_fold<
68 index_node_base<Value,Allocator>,
69 mpl::bind2<index_node_applier,mpl::_2,mpl::_1>
73 } /* namespace multi_index::detail */
75 } /* namespace multi_index */
77 } /* namespace boost */