Back to home page

EIC code displayed by LXR

 
 

    


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

0001 
0002 // Copyright Aleksey Gurtovoy 2000-2004
0003 // Copyright Jaap Suter 2003
0004 //
0005 // Distributed under the Boost Software License, Version 1.0. 
0006 // (See accompanying file LICENSE_1_0.txt or copy at 
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 
0010 // Preprocessed version of "boost/mpl/shift_left.hpp" header
0011 // -- DO NOT modify by hand!
0012 
0013 namespace boost { namespace mpl {
0014 
0015 template<
0016       typename Tag1
0017     , typename Tag2
0018     >
0019 struct shift_left_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< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 >
0026         , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
0027         >::type
0028 {
0029 };
0030 
0031 /// for Digital Mars C++/compilers with no CTPS/TTP support
0032 template<> struct shift_left_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 shift_left_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 shift_left_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 shift_left_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     >
0068 struct shift_left
0069 
0070     : shift_left_impl<
0071           typename shift_left_tag<N1>::type
0072         , typename shift_left_tag<N2>::type
0073         >::template apply< N1,N2 >::type
0074 {
0075     BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2))
0076 
0077 };
0078 
0079 BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)
0080 
0081 }}
0082 
0083 namespace boost { namespace mpl {
0084 
0085 namespace aux {
0086 template< typename T, typename Shift, T n, Shift s >
0087 struct shift_left_wknd
0088 {
0089     BOOST_STATIC_CONSTANT(T, value  = (n << s));
0090     typedef integral_c< T,value > type;
0091 };
0092 
0093 }
0094 
0095 template<>
0096 struct shift_left_impl< integral_c_tag,integral_c_tag >
0097 {
0098     template< typename N, typename S > struct apply
0099         : aux::shift_left_wknd<
0100               typename N::value_type
0101             , typename S::value_type
0102             , N::value
0103             , S::value
0104             >::type
0105 
0106     {
0107     };
0108 };
0109 
0110 }}