Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:20

0001     ///////////////////////////////////////////////////////////////////////////////
0002     // deduce_domain_n.hpp
0003     // Definitions of common_domain[n] and deduce_domain[n] class templates.
0004     //
0005     //  Copyright 2008 Eric Niebler. Distributed under the Boost
0006     //  Software License, Version 1.0. (See accompanying file
0007     //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0008     template<typename A0 , typename A1 , typename A2>
0009     struct common_domain3
0010     {
0011         typedef A0 common1;
0012         typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3;
0013         typedef common3 type;
0014         BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
0015     };
0016     template<typename E0 , typename E1 , typename E2>
0017     struct deduce_domain3
0018       : common_domain3<
0019             typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type
0020         >
0021     {};
0022     template<typename A0 , typename A1 , typename A2 , typename A3>
0023     struct common_domain4
0024     {
0025         typedef A0 common1;
0026         typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4;
0027         typedef common4 type;
0028         BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
0029     };
0030     template<typename E0 , typename E1 , typename E2 , typename E3>
0031     struct deduce_domain4
0032       : common_domain4<
0033             typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type
0034         >
0035     {};
0036     template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
0037     struct common_domain5
0038     {
0039         typedef A0 common1;
0040         typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5;
0041         typedef common5 type;
0042         BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
0043     };
0044     template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4>
0045     struct deduce_domain5
0046       : common_domain5<
0047             typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type
0048         >
0049     {};
0050     template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
0051     struct common_domain6
0052     {
0053         typedef A0 common1;
0054         typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6;
0055         typedef common6 type;
0056         BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
0057     };
0058     template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5>
0059     struct deduce_domain6
0060       : common_domain6<
0061             typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type
0062         >
0063     {};
0064     template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
0065     struct common_domain7
0066     {
0067         typedef A0 common1;
0068         typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6; typedef typename common_domain2<common6, A6>::type common7;
0069         typedef common7 type;
0070         BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
0071     };
0072     template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5 , typename E6>
0073     struct deduce_domain7
0074       : common_domain7<
0075             typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type , typename domain_of<E6 >::type
0076         >
0077     {};
0078     template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
0079     struct common_domain8
0080     {
0081         typedef A0 common1;
0082         typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6; typedef typename common_domain2<common6, A6>::type common7; typedef typename common_domain2<common7, A7>::type common8;
0083         typedef common8 type;
0084         BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
0085     };
0086     template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5 , typename E6 , typename E7>
0087     struct deduce_domain8
0088       : common_domain8<
0089             typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type , typename domain_of<E6 >::type , typename domain_of<E7 >::type
0090         >
0091     {};
0092     template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
0093     struct common_domain9
0094     {
0095         typedef A0 common1;
0096         typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6; typedef typename common_domain2<common6, A6>::type common7; typedef typename common_domain2<common7, A7>::type common8; typedef typename common_domain2<common8, A8>::type common9;
0097         typedef common9 type;
0098         BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
0099     };
0100     template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5 , typename E6 , typename E7 , typename E8>
0101     struct deduce_domain9
0102       : common_domain9<
0103             typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type , typename domain_of<E6 >::type , typename domain_of<E7 >::type , typename domain_of<E8 >::type
0104         >
0105     {};
0106     template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
0107     struct common_domain10
0108     {
0109         typedef A0 common1;
0110         typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6; typedef typename common_domain2<common6, A6>::type common7; typedef typename common_domain2<common7, A7>::type common8; typedef typename common_domain2<common8, A8>::type common9; typedef typename common_domain2<common9, A9>::type common10;
0111         typedef common10 type;
0112         BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
0113     };
0114     template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5 , typename E6 , typename E7 , typename E8 , typename E9>
0115     struct deduce_domain10
0116       : common_domain10<
0117             typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type , typename domain_of<E6 >::type , typename domain_of<E7 >::type , typename domain_of<E8 >::type , typename domain_of<E9 >::type
0118         >
0119     {};