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