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

Private GIT Repository
b7cf52fde5205de62795beb2e8fd0cf0cb238f5c
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / mpl / aux_ / arithmetic_op.hpp
1 \r
2 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION\r
3 \r
4 // Copyright Aleksey Gurtovoy 2000-2004\r
5 //\r
6 // Distributed under the Boost Software License, Version 1.0. \r
7 // (See accompanying file LICENSE_1_0.txt or copy at \r
8 // http://www.boost.org/LICENSE_1_0.txt)\r
9 //\r
10 // See http://www.boost.org/libs/mpl for documentation.\r
11 \r
12 // $Id: arithmetic_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $\r
13 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $\r
14 // $Revision: 49267 $\r
15 \r
16 #if !defined(BOOST_MPL_PREPROCESSING_MODE)\r
17 #   include <boost/mpl/integral_c.hpp>\r
18 #   include <boost/mpl/aux_/largest_int.hpp>\r
19 #   include <boost/mpl/aux_/value_wknd.hpp>\r
20 #endif\r
21 \r
22 #if !defined(AUX778076_OP_PREFIX)\r
23 #   define AUX778076_OP_PREFIX AUX778076_OP_NAME\r
24 #endif\r
25 \r
26 #include <boost/mpl/aux_/numeric_op.hpp>\r
27 #include <boost/mpl/aux_/config/static_constant.hpp>\r
28 #include <boost/mpl/aux_/config/use_preprocessed.hpp>\r
29 \r
30 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \\r
31     && !defined(BOOST_MPL_PREPROCESSING_MODE)\r
32 \r
33 #   define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp\r
34 #   include <boost/mpl/aux_/include_preprocessed.hpp>\r
35 \r
36 #else\r
37 \r
38 #   include <boost/mpl/aux_/config/workaround.hpp>\r
39 #   include <boost/preprocessor/cat.hpp>\r
40 \r
41 \r
42 namespace boost { namespace mpl {\r
43 \r
44 #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)\r
45 namespace aux {\r
46 template< typename T, T n1, T n2 >\r
47 struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)\r
48 {\r
49     BOOST_STATIC_CONSTANT(T, value = (n1 AUX778076_OP_TOKEN n2));\r
50     typedef integral_c<T,value> type;\r
51 };\r
52 }\r
53 #endif\r
54 \r
55 template<>\r
56 struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>\r
57 {\r
58     template< typename N1, typename N2 > struct apply\r
59 #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)\r
60         : integral_c<\r
61               typename aux::largest_int<\r
62                   typename N1::value_type\r
63                 , typename N2::value_type\r
64                 >::type\r
65             , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value\r
66                   AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value\r
67                 )\r
68             >\r
69 #else\r
70         : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)<\r
71               typename aux::largest_int<\r
72                   typename N1::value_type\r
73                 , typename N2::value_type\r
74                 >::type\r
75             , N1::value\r
76             , N2::value\r
77             >::type\r
78 #endif\r
79     {\r
80     };\r
81 };\r
82 \r
83 }}\r
84 \r
85 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS\r
86 \r
87 #undef AUX778076_OP_TAG_NAME\r
88 #undef AUX778076_OP_IMPL_NAME\r
89 #undef AUX778076_OP_ARITY\r
90 #undef AUX778076_OP_PREFIX\r
91 #undef AUX778076_OP_NAME\r
92 #undef AUX778076_OP_TOKEN\r