File indexing completed on 2025-01-18 09:41:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 namespace boost { namespace mpl {
0014
0015 template<
0016 typename Tag1
0017 , typename Tag2
0018 >
0019 struct bitand_impl
0020 : if_c<
0021 ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
0022 > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
0023 )
0024
0025 , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
0026 , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
0027 >::type
0028 {
0029 };
0030
0031
0032 template<> struct bitand_impl< na,na >
0033 {
0034 template< typename U1, typename U2 > struct apply
0035 {
0036 typedef apply type;
0037 BOOST_STATIC_CONSTANT(int, value = 0);
0038 };
0039 };
0040
0041 template< typename Tag > struct bitand_impl< na,Tag >
0042 {
0043 template< typename U1, typename U2 > struct apply
0044 {
0045 typedef apply type;
0046 BOOST_STATIC_CONSTANT(int, value = 0);
0047 };
0048 };
0049
0050 template< typename Tag > struct bitand_impl< Tag,na >
0051 {
0052 template< typename U1, typename U2 > struct apply
0053 {
0054 typedef apply type;
0055 BOOST_STATIC_CONSTANT(int, value = 0);
0056 };
0057 };
0058
0059 template< typename T > struct bitand_tag
0060 {
0061 typedef typename T::tag type;
0062 };
0063
0064 template<
0065 typename BOOST_MPL_AUX_NA_PARAM(N1)
0066 , typename BOOST_MPL_AUX_NA_PARAM(N2)
0067 , typename N3 = na, typename N4 = na, typename N5 = na
0068 >
0069 struct bitand_
0070 : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
0071 {
0072 BOOST_MPL_AUX_LAMBDA_SUPPORT(
0073 5
0074 , bitand_
0075 , ( N1, N2, N3, N4, N5 )
0076 )
0077 };
0078
0079 template<
0080 typename N1, typename N2, typename N3, typename N4
0081 >
0082 struct bitand_< N1,N2,N3,N4,na >
0083
0084 : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
0085 {
0086 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
0087 5
0088 , bitand_
0089 , ( N1, N2, N3, N4, na )
0090 )
0091 };
0092
0093 template<
0094 typename N1, typename N2, typename N3
0095 >
0096 struct bitand_< N1,N2,N3,na,na >
0097
0098 : bitand_< bitand_< N1,N2 >, N3>
0099 {
0100 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
0101 5
0102 , bitand_
0103 , ( N1, N2, N3, na, na )
0104 )
0105 };
0106
0107 template<
0108 typename N1, typename N2
0109 >
0110 struct bitand_< N1,N2,na,na,na >
0111 : bitand_impl<
0112 typename bitand_tag<N1>::type
0113 , typename bitand_tag<N2>::type
0114 >::template apply< N1,N2 >::type
0115 {
0116 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
0117 5
0118 , bitand_
0119 , ( N1, N2, na, na, na )
0120 )
0121
0122 };
0123
0124 BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_)
0125
0126 }}
0127
0128 namespace boost { namespace mpl {
0129 template<>
0130 struct bitand_impl< integral_c_tag,integral_c_tag >
0131 {
0132 template< typename N1, typename N2 > struct apply
0133
0134 : integral_c<
0135 typename aux::largest_int<
0136 typename N1::value_type
0137 , typename N2::value_type
0138 >::type
0139 , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
0140 & BOOST_MPL_AUX_VALUE_WKND(N2)::value
0141 )
0142 >
0143 {
0144 };
0145 };
0146
0147 }}