Chris@16: Chris@16: // Copyright Aleksey Gurtovoy 2000-2004 Chris@16: // Copyright Jaap Suter 2003 Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: Chris@16: // Preprocessed version of "boost/mpl/bitand.hpp" header Chris@16: // -- DO NOT modify by hand! Chris@16: Chris@16: namespace boost { namespace mpl { Chris@16: Chris@16: template< Chris@16: typename Tag1 Chris@16: , typename Tag2 Chris@16: Chris@16: , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value Chris@16: , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value Chris@16: > Chris@16: struct bitand_impl Chris@16: : if_c< Chris@16: ( tag1_ > tag2_ ) Chris@16: , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > Chris@16: , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > Chris@16: >::type Chris@16: { Chris@16: }; Chris@16: Chris@16: /// for Digital Mars C++/compilers with no CTPS/TTP support Chris@16: template<> struct bitand_impl< na,na > Chris@16: { Chris@16: template< typename U1, typename U2 > struct apply Chris@16: { Chris@16: typedef apply type; Chris@16: BOOST_STATIC_CONSTANT(int, value = 0); Chris@16: }; Chris@16: }; Chris@16: Chris@16: template<> struct bitand_impl< na,integral_c_tag > Chris@16: { Chris@16: template< typename U1, typename U2 > struct apply Chris@16: { Chris@16: typedef apply type; Chris@16: BOOST_STATIC_CONSTANT(int, value = 0); Chris@16: }; Chris@16: }; Chris@16: Chris@16: template<> struct bitand_impl< integral_c_tag,na > Chris@16: { Chris@16: template< typename U1, typename U2 > struct apply Chris@16: { Chris@16: typedef apply type; Chris@16: BOOST_STATIC_CONSTANT(int, value = 0); Chris@16: }; Chris@16: }; Chris@16: Chris@16: template< typename T > struct bitand_tag Chris@16: : tag< T,na > Chris@16: { Chris@16: }; Chris@16: Chris@16: /// forward declaration Chris@16: Chris@16: template< Chris@16: typename BOOST_MPL_AUX_NA_PARAM(N1) Chris@16: , typename BOOST_MPL_AUX_NA_PARAM(N2) Chris@16: > Chris@16: struct bitand_2; Chris@16: Chris@16: template< Chris@16: typename BOOST_MPL_AUX_NA_PARAM(N1) Chris@16: , typename BOOST_MPL_AUX_NA_PARAM(N2) Chris@16: , typename N3 = na, typename N4 = na, typename N5 = na Chris@16: > Chris@16: struct bitand_ Chris@16: Chris@16: : aux::msvc_eti_base< typename if_< Chris@16: Chris@16: is_na Chris@16: , bitand_2< N1,N2 > Chris@16: , bitand_< Chris@16: bitand_2< N1,N2 > Chris@16: , N3, N4, N5 Chris@16: > Chris@16: >::type Chris@16: Chris@16: > Chris@16: Chris@16: { Chris@16: BOOST_MPL_AUX_LAMBDA_SUPPORT( Chris@16: 5 Chris@16: , bitand_ Chris@16: , ( N1, N2, N3, N4, N5 ) Chris@16: ) Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename N1 Chris@16: , typename N2 Chris@16: > Chris@16: struct bitand_2 Chris@16: : aux::msvc_eti_base< typename apply_wrap2< Chris@16: bitand_impl< Chris@16: typename bitand_tag::type Chris@16: , typename bitand_tag::type Chris@16: > Chris@16: , N1 Chris@16: , N2 Chris@16: >::type >::type Chris@16: Chris@16: { Chris@16: BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) Chris@16: Chris@16: }; Chris@16: Chris@16: BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) Chris@16: Chris@16: }} Chris@16: Chris@16: namespace boost { namespace mpl { Chris@16: Chris@16: namespace aux { Chris@16: template< typename T, T n1, T n2 > Chris@16: struct bitand_wknd Chris@16: { Chris@16: BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); Chris@16: typedef integral_c< T,value > type; Chris@16: }; Chris@16: Chris@16: } Chris@16: Chris@16: template<> Chris@16: struct bitand_impl< integral_c_tag,integral_c_tag > Chris@16: { Chris@16: template< typename N1, typename N2 > struct apply Chris@16: : aux::bitand_wknd< Chris@16: typename aux::largest_int< Chris@16: typename N1::value_type Chris@16: , typename N2::value_type Chris@16: >::type Chris@16: , N1::value Chris@16: , N2::value Chris@16: >::type Chris@16: Chris@16: { Chris@16: }; Chris@16: }; Chris@16: Chris@16: }}