]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.TypeErasure library |
2 | // | |
3 | // Copyright 2011 Steven Watanabe | |
4 | // | |
5 | // Distributed under the Boost Software License Version 1.0. (See | |
6 | // accompanying file LICENSE_1_0.txt or copy at | |
7 | // http://www.boost.org/LICENSE_1_0.txt) | |
8 | // | |
9 | // $Id$ | |
10 | ||
11 | #if !defined(BOOST_PP_IS_ITERATING) | |
12 | ||
13 | #ifndef BOOST_TYPE_ERASURE_DETAIL_NORMALIZE_DEDUCED_HPP_INCLUDED | |
14 | #define BOOST_TYPE_ERASURE_DETAIL_NORMALIZE_DEDUCED_HPP_INCLUDED | |
15 | ||
16 | #include <boost/preprocessor/iteration/iterate.hpp> | |
17 | #include <boost/preprocessor/repetition/enum.hpp> | |
18 | #include <boost/preprocessor/repetition/enum_params.hpp> | |
11fdf7f2 TL |
19 | #include <boost/type_erasure/detail/meta.hpp> |
20 | ||
21 | #ifndef BOOST_TYPE_ERASURE_USE_MP11 | |
7c673cae FG |
22 | |
23 | namespace boost { | |
24 | namespace type_erasure { | |
25 | namespace detail { | |
26 | ||
27 | template<class M, class T> | |
28 | struct normalize_deduced; | |
29 | template<class M, class T> | |
30 | struct normalize_placeholder; | |
31 | ||
32 | #define BOOST_PP_FILENAME_1 <boost/type_erasure/detail/normalize_deduced.hpp> | |
33 | #define BOOST_PP_ITERATION_LIMITS (1, BOOST_TYPE_ERASURE_MAX_ARITY) | |
34 | #include BOOST_PP_ITERATE() | |
35 | ||
36 | } | |
37 | } | |
38 | } | |
39 | ||
40 | #endif | |
41 | ||
11fdf7f2 TL |
42 | #endif |
43 | ||
7c673cae FG |
44 | #else |
45 | ||
46 | #define N BOOST_PP_ITERATION() | |
47 | ||
48 | #define BOOST_TYPE_ERASURE_NORMALIZE_PLACEHOLDER(z, n, data) \ | |
49 | typename ::boost::type_erasure::detail::normalize_placeholder< \ | |
50 | M, \ | |
51 | BOOST_PP_CAT(U, n) \ | |
52 | >::type | |
53 | ||
54 | template<class M, template<BOOST_PP_ENUM_PARAMS(N, class T)> class T, BOOST_PP_ENUM_PARAMS(N, class U)> | |
55 | struct normalize_deduced<M, T<BOOST_PP_ENUM_PARAMS(N, U)> > | |
56 | { | |
57 | typedef typename ::boost::type_erasure::deduced< | |
58 | T<BOOST_PP_ENUM(N, BOOST_TYPE_ERASURE_NORMALIZE_PLACEHOLDER, ~)> | |
59 | >::type type; | |
60 | }; | |
61 | ||
62 | #undef BOOST_TYPE_ERASURE_NORMALIZE_PLACEHOLDER | |
63 | ||
64 | #undef N | |
65 | ||
66 | #endif |