Chris@16
|
1
|
Chris@16
|
2 // Copyright Aleksey Gurtovoy 2000-2004
|
Chris@16
|
3 // Copyright Jaap Suter 2003
|
Chris@16
|
4 //
|
Chris@16
|
5 // Distributed under the Boost Software License, Version 1.0.
|
Chris@16
|
6 // (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
7 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
8 //
|
Chris@16
|
9
|
Chris@16
|
10 // Preprocessed version of "boost/mpl/bitand.hpp" header
|
Chris@16
|
11 // -- DO NOT modify by hand!
|
Chris@16
|
12
|
Chris@16
|
13 namespace boost { namespace mpl {
|
Chris@16
|
14
|
Chris@16
|
15 template<
|
Chris@16
|
16 typename Tag1
|
Chris@16
|
17 , typename Tag2
|
Chris@16
|
18 >
|
Chris@16
|
19 struct bitand_impl
|
Chris@16
|
20 : if_c<
|
Chris@16
|
21 ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
Chris@16
|
22 > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
Chris@16
|
23 )
|
Chris@16
|
24
|
Chris@16
|
25 , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
Chris@16
|
26 , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
Chris@16
|
27 >::type
|
Chris@16
|
28 {
|
Chris@16
|
29 };
|
Chris@16
|
30
|
Chris@16
|
31 /// for Digital Mars C++/compilers with no CTPS/TTP support
|
Chris@16
|
32 template<> struct bitand_impl< na,na >
|
Chris@16
|
33 {
|
Chris@16
|
34 template< typename U1, typename U2 > struct apply
|
Chris@16
|
35 {
|
Chris@16
|
36 typedef apply type;
|
Chris@16
|
37 BOOST_STATIC_CONSTANT(int, value = 0);
|
Chris@16
|
38 };
|
Chris@16
|
39 };
|
Chris@16
|
40
|
Chris@16
|
41 template< typename Tag > struct bitand_impl< na,Tag >
|
Chris@16
|
42 {
|
Chris@16
|
43 template< typename U1, typename U2 > struct apply
|
Chris@16
|
44 {
|
Chris@16
|
45 typedef apply type;
|
Chris@16
|
46 BOOST_STATIC_CONSTANT(int, value = 0);
|
Chris@16
|
47 };
|
Chris@16
|
48 };
|
Chris@16
|
49
|
Chris@16
|
50 template< typename Tag > struct bitand_impl< Tag,na >
|
Chris@16
|
51 {
|
Chris@16
|
52 template< typename U1, typename U2 > struct apply
|
Chris@16
|
53 {
|
Chris@16
|
54 typedef apply type;
|
Chris@16
|
55 BOOST_STATIC_CONSTANT(int, value = 0);
|
Chris@16
|
56 };
|
Chris@16
|
57 };
|
Chris@16
|
58
|
Chris@16
|
59 template< typename T > struct bitand_tag
|
Chris@16
|
60 {
|
Chris@16
|
61 typedef typename T::tag type;
|
Chris@16
|
62 };
|
Chris@16
|
63
|
Chris@16
|
64 template<
|
Chris@16
|
65 typename BOOST_MPL_AUX_NA_PARAM(N1)
|
Chris@16
|
66 , typename BOOST_MPL_AUX_NA_PARAM(N2)
|
Chris@16
|
67 , typename N3 = na, typename N4 = na, typename N5 = na
|
Chris@16
|
68 >
|
Chris@16
|
69 struct bitand_
|
Chris@16
|
70 : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
|
Chris@16
|
71 {
|
Chris@16
|
72 };
|
Chris@16
|
73
|
Chris@16
|
74 template<
|
Chris@16
|
75 typename N1, typename N2, typename N3, typename N4
|
Chris@16
|
76 >
|
Chris@16
|
77 struct bitand_< N1,N2,N3,N4,na >
|
Chris@16
|
78
|
Chris@16
|
79 : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
|
Chris@16
|
80 {
|
Chris@16
|
81 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
Chris@16
|
82 5
|
Chris@16
|
83 , bitand_
|
Chris@16
|
84 , ( N1, N2, N3, N4, na )
|
Chris@16
|
85 )
|
Chris@16
|
86 };
|
Chris@16
|
87
|
Chris@16
|
88 template<
|
Chris@16
|
89 typename N1, typename N2, typename N3
|
Chris@16
|
90 >
|
Chris@16
|
91 struct bitand_< N1,N2,N3,na,na >
|
Chris@16
|
92
|
Chris@16
|
93 : bitand_< bitand_< N1,N2 >, N3>
|
Chris@16
|
94 {
|
Chris@16
|
95 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
Chris@16
|
96 5
|
Chris@16
|
97 , bitand_
|
Chris@16
|
98 , ( N1, N2, N3, na, na )
|
Chris@16
|
99 )
|
Chris@16
|
100 };
|
Chris@16
|
101
|
Chris@16
|
102 template<
|
Chris@16
|
103 typename N1, typename N2
|
Chris@16
|
104 >
|
Chris@16
|
105 struct bitand_< N1,N2,na,na,na >
|
Chris@16
|
106 : bitand_impl<
|
Chris@16
|
107 typename bitand_tag<N1>::type
|
Chris@16
|
108 , typename bitand_tag<N2>::type
|
Chris@16
|
109 >::template apply< N1,N2 >::type
|
Chris@16
|
110 {
|
Chris@16
|
111 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
|
Chris@16
|
112 5
|
Chris@16
|
113 , bitand_
|
Chris@16
|
114 , ( N1, N2, na, na, na )
|
Chris@16
|
115 )
|
Chris@16
|
116
|
Chris@16
|
117 };
|
Chris@16
|
118
|
Chris@16
|
119 BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
|
Chris@16
|
120
|
Chris@16
|
121 }}
|
Chris@16
|
122
|
Chris@16
|
123 namespace boost { namespace mpl {
|
Chris@16
|
124 template<>
|
Chris@16
|
125 struct bitand_impl< integral_c_tag,integral_c_tag >
|
Chris@16
|
126 {
|
Chris@16
|
127 template< typename N1, typename N2 > struct apply
|
Chris@16
|
128
|
Chris@16
|
129 : integral_c<
|
Chris@16
|
130 typename aux::largest_int<
|
Chris@16
|
131 typename N1::value_type
|
Chris@16
|
132 , typename N2::value_type
|
Chris@16
|
133 >::type
|
Chris@16
|
134 , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
|
Chris@16
|
135 & BOOST_MPL_AUX_VALUE_WKND(N2)::value
|
Chris@16
|
136 )
|
Chris@16
|
137 >
|
Chris@16
|
138 {
|
Chris@16
|
139 };
|
Chris@16
|
140 };
|
Chris@16
|
141
|
Chris@16
|
142 }}
|