2 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
\r
4 #if !defined(BOOST_PP_IS_ITERATING)
\r
6 // Copyright Aleksey Gurtovoy 2000-2004
\r
8 // Distributed under the Boost Software License, Version 1.0.
\r
9 // (See accompanying file LICENSE_1_0.txt or copy at
\r
10 // http://www.boost.org/LICENSE_1_0.txt)
\r
12 // See http://www.boost.org/libs/mpl for documentation.
\r
14 // $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
\r
15 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
16 // $Revision: 49267 $
\r
20 #include <boost/mpl/aux_/config/typeof.hpp>
\r
21 #include <boost/mpl/aux_/config/ctps.hpp>
\r
22 #include <boost/preprocessor/enum_params.hpp>
\r
23 #include <boost/preprocessor/dec.hpp>
\r
24 #include <boost/preprocessor/cat.hpp>
\r
26 #define i_ BOOST_PP_FRAME_ITERATION(1)
\r
28 # define AUX778076_MAP_TAIL(map, i_, P) \
\r
29 BOOST_PP_CAT(map,i_)< \
\r
30 BOOST_PP_ENUM_PARAMS(i_, P) \
\r
35 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
\r
38 BOOST_PP_ENUM_PARAMS(i_, typename P)
\r
40 struct BOOST_PP_CAT(map,i_)
\r
42 typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::first
\r
43 , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::second
\r
44 , AUX778076_MAP_TAIL(map,BOOST_PP_DEC(i_),P)
\r
47 typedef BOOST_PP_CAT(map,i_) type;
\r
50 #else // "brute force" implementation
\r
52 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
\r
54 template< typename Map>
\r
55 struct m_at<Map,BOOST_PP_DEC(i_)>
\r
57 typedef typename Map::BOOST_PP_CAT(item,BOOST_PP_DEC(i_)) type;
\r
60 template< typename Key, typename T, typename Base >
\r
61 struct m_item<i_,Key,T,Base>
\r
62 : m_item_<Key,T,Base>
\r
64 typedef pair<Key,T> BOOST_PP_CAT(item,BOOST_PP_DEC(i_));
\r
70 struct m_at_impl<BOOST_PP_DEC(i_)>
\r
72 template< typename Map > struct result_
\r
74 typedef typename Map::BOOST_PP_CAT(item,BOOST_PP_DEC(i_)) type;
\r
79 struct m_item_impl<i_>
\r
81 template< typename Key, typename T, typename Base > struct result_
\r
82 : m_item_<Key,T,Base>
\r
84 typedef pair<Key,T> BOOST_PP_CAT(item,BOOST_PP_DEC(i_));
\r
91 BOOST_PP_ENUM_PARAMS(i_, typename P)
\r
93 struct BOOST_PP_CAT(map,i_)
\r
96 , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::first
\r
97 , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::second
\r
98 , AUX778076_MAP_TAIL(map,BOOST_PP_DEC(i_),P)
\r
101 typedef BOOST_PP_CAT(map,i_) type;
\r
104 #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
\r
106 # undef AUX778076_MAP_TAIL
\r
110 #endif // BOOST_PP_IS_ITERATING
\r