Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:32

0001 
0002 // Copyright Aleksey Gurtovoy 2000-2004
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. 
0005 // (See accompanying file LICENSE_1_0.txt or copy at 
0006 // http://www.boost.org/LICENSE_1_0.txt)
0007 //
0008 
0009 // Preprocessed version of "boost/mpl/minus.hpp" header
0010 // -- DO NOT modify by hand!
0011 
0012 namespace boost { namespace mpl {
0013 
0014 template<
0015       typename Tag1
0016     , typename Tag2
0017     >
0018 struct minus_impl
0019     : if_c<
0020           ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
0021               > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
0022             )
0023 
0024         , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
0025         , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
0026         >::type
0027 {
0028 };
0029 
0030 /// for Digital Mars C++/compilers with no CTPS/TTP support
0031 template<> struct minus_impl< na,na >
0032 {
0033     template< typename U1, typename U2 > struct apply
0034     {
0035         typedef apply type;
0036         BOOST_STATIC_CONSTANT(int, value  = 0);
0037     };
0038 };
0039 
0040 template< typename Tag > struct minus_impl< na,Tag >
0041 {
0042     template< typename U1, typename U2 > struct apply
0043     {
0044         typedef apply type;
0045         BOOST_STATIC_CONSTANT(int, value  = 0);
0046     };
0047 };
0048 
0049 template< typename Tag > struct minus_impl< Tag,na >
0050 {
0051     template< typename U1, typename U2 > struct apply
0052     {
0053         typedef apply type;
0054         BOOST_STATIC_CONSTANT(int, value  = 0);
0055     };
0056 };
0057 
0058 template< typename T > struct minus_tag
0059 {
0060     typedef typename T::tag type;
0061 };
0062 
0063 template<
0064       typename BOOST_MPL_AUX_NA_PARAM(N1)
0065     , typename BOOST_MPL_AUX_NA_PARAM(N2)
0066     , typename N3 = na, typename N4 = na, typename N5 = na
0067     >
0068 struct minus
0069     : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
0070 {
0071     BOOST_MPL_AUX_LAMBDA_SUPPORT(
0072           5
0073         , minus
0074         , ( N1, N2, N3, N4, N5 )
0075         )
0076 };
0077 
0078 template<
0079       typename N1, typename N2, typename N3, typename N4
0080     >
0081 struct minus< N1,N2,N3,N4,na >
0082 
0083     : minus< minus< minus< N1,N2 >, N3>, N4>
0084 {
0085     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
0086           5
0087         , minus
0088         , ( N1, N2, N3, N4, na )
0089         )
0090 };
0091 
0092 template<
0093       typename N1, typename N2, typename N3
0094     >
0095 struct minus< N1,N2,N3,na,na >
0096 
0097     : minus< minus< N1,N2 >, N3>
0098 {
0099     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
0100           5
0101         , minus
0102         , ( N1, N2, N3, na, na )
0103         )
0104 };
0105 
0106 template<
0107       typename N1, typename N2
0108     >
0109 struct minus< N1,N2,na,na,na >
0110     : minus_impl<
0111           typename minus_tag<N1>::type
0112         , typename minus_tag<N2>::type
0113         >::template apply< N1,N2 >::type
0114 {
0115     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
0116           5
0117         , minus
0118         , ( N1, N2, na, na, na )
0119         )
0120 
0121 };
0122 
0123 BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
0124 
0125 }}
0126 
0127 namespace boost { namespace mpl {
0128 
0129 namespace aux {
0130 template< typename T, T n1, T n2 >
0131 struct minus_wknd
0132 {
0133     BOOST_STATIC_CONSTANT(T, value  = (n1 - n2));
0134     typedef integral_c< T,value > type;
0135 };
0136 
0137 }
0138 
0139 template<>
0140 struct minus_impl< integral_c_tag,integral_c_tag >
0141 {
0142     template< typename N1, typename N2 > struct apply
0143         : aux::minus_wknd<
0144               typename aux::largest_int<
0145                   typename N1::value_type
0146                 , typename N2::value_type
0147                 >::type
0148             , N1::value
0149             , N2::value
0150             >::type
0151 
0152     {
0153     };
0154 };
0155 
0156 }}