]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/mpl/aux_/numeric_cast_utils.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
b0a6c7a19c7e2dca1b5bba40ec18b1b7b6f309d3
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / mpl / aux_ / numeric_cast_utils.hpp
1 \r
2 #ifndef BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED\r
3 #define BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED\r
4 \r
5 // Copyright Aleksey Gurtovoy 2003-2004\r
6 //\r
7 // Distributed under the Boost Software License, Version 1.0. \r
8 // (See accompanying file LICENSE_1_0.txt or copy at \r
9 // http://www.boost.org/LICENSE_1_0.txt)\r
10 //\r
11 // See http://www.boost.org/libs/mpl for documentation.\r
12 \r
13 // $Id: numeric_cast_utils.hpp 49267 2008-10-11 06:19:02Z agurtovoy $\r
14 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $\r
15 // $Revision: 49267 $\r
16 \r
17 #include <boost/mpl/numeric_cast.hpp>\r
18 #include <boost/mpl/apply_wrap.hpp>\r
19 #include <boost/mpl/aux_/config/forwarding.hpp>\r
20 \r
21 namespace boost { namespace mpl { namespace aux {\r
22 \r
23 template<\r
24       typename F\r
25     , typename Tag1\r
26     , typename Tag2\r
27     >\r
28 struct cast1st_impl\r
29 {\r
30     template< typename N1, typename N2 > struct apply\r
31 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)\r
32         : apply_wrap2< \r
33               F\r
34             , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag1,Tag2>,N1 >::type\r
35             , N2\r
36             >\r
37     {\r
38 #else\r
39     {\r
40     typedef typename apply_wrap2< \r
41               F\r
42             , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag1,Tag2>,N1 >::type\r
43             , N2\r
44             >::type type;\r
45 #endif\r
46     };\r
47 };\r
48 \r
49 template<\r
50       typename F\r
51     , typename Tag1\r
52     , typename Tag2\r
53     >\r
54 struct cast2nd_impl\r
55 {\r
56     template< typename N1, typename N2 > struct apply\r
57 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)\r
58         : apply_wrap2< \r
59               F\r
60             , N1\r
61             , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag2,Tag1>,N2 >::type\r
62             >\r
63     {\r
64 #else\r
65     {\r
66         typedef typename apply_wrap2< \r
67               F\r
68             , N1\r
69             , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag2,Tag1>,N2 >::type\r
70             >::type type;\r
71 #endif\r
72     };\r
73 };\r
74 \r
75 }}}\r
76 \r
77 #endif // BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED\r