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_c.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
18 #include <boost/preprocessor/enum_params.hpp>
\r
19 #include <boost/preprocessor/enum_shifted_params.hpp>
\r
20 #include <boost/preprocessor/comma_if.hpp>
\r
21 #include <boost/preprocessor/repeat.hpp>
\r
22 #include <boost/preprocessor/dec.hpp>
\r
23 #include <boost/preprocessor/cat.hpp>
\r
25 #define i_ BOOST_PP_FRAME_ITERATION(1)
\r
27 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
\r
29 # define AUX778076_VECTOR_TAIL(vector, i_, C) \
\r
30 BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)<T \
\r
31 BOOST_PP_COMMA_IF(i_) BOOST_PP_ENUM_PARAMS(i_, C) \
\r
38 , BOOST_PP_ENUM_PARAMS(i_, T C)
\r
40 struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)
\r
42 integral_c<T,BOOST_PP_CAT(C,BOOST_PP_DEC(i_))>
\r
43 , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),C)
\r
46 typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;
\r
47 typedef T value_type;
\r
51 # undef AUX778076_VECTOR_TAIL
\r
53 #else // "brute force" implementation
\r
55 # define AUX778076_VECTOR_C_PARAM_FUNC(unused, i_, param) \
\r
56 BOOST_PP_COMMA_IF(i_) \
\r
57 integral_c<T,BOOST_PP_CAT(param,i_)> \
\r
62 , BOOST_PP_ENUM_PARAMS(i_, T C)
\r
64 struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)
\r
65 : BOOST_PP_CAT(vector,i_)< BOOST_PP_REPEAT(i_,AUX778076_VECTOR_C_PARAM_FUNC,C) >
\r
67 typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;
\r
68 typedef T value_type;
\r
71 # undef AUX778076_VECTOR_C_PARAM_FUNC
\r
73 #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
\r
77 #endif // BOOST_PP_IS_ITERATING
\r