/* Copyright 2003-2008 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * See http://www.boost.org/libs/multi_index for library home page. */ #ifndef BOOST_MULTI_INDEX_DETAIL_BASE_TYPE_HPP #define BOOST_MULTI_INDEX_DETAIL_BASE_TYPE_HPP #if defined(_MSC_VER)&&(_MSC_VER>=1200) #pragma once #endif #include /* keep it first to prevent nasty warns in MSVC */ #include #include #include #include #include #include #include #include namespace boost{ namespace multi_index{ namespace detail{ /* MPL machinery to construct a linear hierarchy of indices out of * a index list. */ #if BOOST_WORKAROUND(BOOST_MSVC,<1310) struct index_applier { template struct apply: msvc_index_specifier:: template result_index_class { }; }; #else struct index_applier { template struct apply { typedef typename IndexSpecifierMeta::type index_specifier; typedef typename index_specifier:: BOOST_NESTED_TEMPLATE index_class::type type; }; }; #endif template struct nth_layer { BOOST_STATIC_CONSTANT(int,length=mpl::size::value); typedef typename mpl::eval_if_c< N==length, mpl::identity >, mpl::apply2< index_applier, mpl::at_c, nth_layer > >::type type; }; template struct multi_index_base_type:nth_layer<0,Value,IndexSpecifierList,Allocator> { BOOST_STATIC_ASSERT(detail::is_index_list::value); }; } /* namespace multi_index::detail */ } /* namespace multi_index */ } /* namespace boost */ #endif