1 // Boost.TypeErasure library
3 // Copyright 2011 Steven Watanabe
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)
11 #if !defined(BOOST_PP_IS_ITERATING)
13 #ifndef BOOST_TYPE_ERASURE_DETAIL_NORMALIZE_DEDUCED_HPP_INCLUDED
14 #define BOOST_TYPE_ERASURE_DETAIL_NORMALIZE_DEDUCED_HPP_INCLUDED
16 #include <boost/preprocessor/iteration/iterate.hpp>
17 #include <boost/preprocessor/repetition/enum.hpp>
18 #include <boost/preprocessor/repetition/enum_params.hpp>
21 namespace type_erasure {
24 template<class M, class T>
25 struct normalize_deduced;
26 template<class M, class T>
27 struct normalize_placeholder;
29 #define BOOST_PP_FILENAME_1 <boost/type_erasure/detail/normalize_deduced.hpp>
30 #define BOOST_PP_ITERATION_LIMITS (1, BOOST_TYPE_ERASURE_MAX_ARITY)
31 #include BOOST_PP_ITERATE()
41 #define N BOOST_PP_ITERATION()
43 #define BOOST_TYPE_ERASURE_NORMALIZE_PLACEHOLDER(z, n, data) \
44 typename ::boost::type_erasure::detail::normalize_placeholder< \
49 template<class M, template<BOOST_PP_ENUM_PARAMS(N, class T)> class T, BOOST_PP_ENUM_PARAMS(N, class U)>
50 struct normalize_deduced<M, T<BOOST_PP_ENUM_PARAMS(N, U)> >
52 typedef typename ::boost::type_erasure::deduced<
53 T<BOOST_PP_ENUM(N, BOOST_TYPE_ERASURE_NORMALIZE_PLACEHOLDER, ~)>
57 #undef BOOST_TYPE_ERASURE_NORMALIZE_PLACEHOLDER