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/bool.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 // MSVC workaround: implement less in terms of greater
|
Chris@16
|
45 #if 0 AUX778076_OP_TOKEN 1 && !(1 AUX778076_OP_TOKEN 0) && !(0 AUX778076_OP_TOKEN 0)
|
Chris@16
|
46 # define AUX778076_OP(N1, N2) \
|
Chris@16
|
47 ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) \
|
Chris@16
|
48 /**/
|
Chris@16
|
49 #else
|
Chris@16
|
50 # define AUX778076_OP(N1, N2) \
|
Chris@16
|
51 ( BOOST_MPL_AUX_VALUE_WKND(N1)::value \
|
Chris@16
|
52 AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value \
|
Chris@16
|
53 ) \
|
Chris@16
|
54 /**/
|
Chris@16
|
55 #endif
|
Chris@16
|
56
|
Chris@16
|
57 template<>
|
Chris@16
|
58 struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>
|
Chris@16
|
59 {
|
Chris@16
|
60 template< typename N1, typename N2 > struct apply
|
Chris@16
|
61 #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
|
Chris@16
|
62 : bool_< AUX778076_OP(N1, N2) >
|
Chris@16
|
63 {
|
Chris@16
|
64 #else
|
Chris@16
|
65 {
|
Chris@16
|
66 BOOST_STATIC_CONSTANT(bool, value = AUX778076_OP(N1, N2));
|
Chris@16
|
67 typedef bool_<value> type;
|
Chris@16
|
68 #endif
|
Chris@16
|
69 };
|
Chris@16
|
70 };
|
Chris@16
|
71
|
Chris@16
|
72 #undef AUX778076_OP
|
Chris@16
|
73
|
Chris@16
|
74 }}
|
Chris@16
|
75
|
Chris@16
|
76 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
Chris@16
|
77
|
Chris@16
|
78 #undef AUX778076_OP_TAG_NAME
|
Chris@16
|
79 #undef AUX778076_OP_IMPL_NAME
|
Chris@16
|
80 #undef AUX778076_OP_ARITY
|
Chris@16
|
81 #undef AUX778076_OP_PREFIX
|
Chris@16
|
82 #undef AUX778076_OP_NAME
|
Chris@16
|
83 #undef AUX778076_OP_TOKEN
|