]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/mpl/vector/aux_/numbered_c.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
3a85061dafdc6ff9a3f49906b569d720b8240f12
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / mpl / vector / aux_ / numbered_c.hpp
1 \r
2 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION\r
3 \r
4 #if defined(BOOST_PP_IS_ITERATING)\r
5 \r
6 // Copyright Aleksey Gurtovoy 2000-2004\r
7 //\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
11 //\r
12 // See http://www.boost.org/libs/mpl for documentation.\r
13 \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
17 \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
24 \r
25 #define i_ BOOST_PP_FRAME_ITERATION(1)\r
26 \r
27 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)\r
28 \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
32         > \\r
33     /**/\r
34 \r
35 #if i_ > 0\r
36 template<\r
37       typename T\r
38     , BOOST_PP_ENUM_PARAMS(i_, T C)\r
39     >\r
40 struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)\r
41     : v_item<\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
44         >\r
45 {\r
46     typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;\r
47     typedef T value_type;\r
48 };\r
49 #endif\r
50 \r
51 #   undef AUX778076_VECTOR_TAIL\r
52 \r
53 #else // "brute force" implementation\r
54 \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
58     /**/\r
59 \r
60 template<\r
61       typename T\r
62     , BOOST_PP_ENUM_PARAMS(i_, T C)\r
63     >\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
66 {\r
67     typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type;\r
68     typedef T value_type;\r
69 };\r
70 \r
71 #   undef AUX778076_VECTOR_C_PARAM_FUNC\r
72 \r
73 #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES\r
74 \r
75 #undef i_\r
76 \r
77 #endif // BOOST_PP_IS_ITERATING\r