Chris@16
|
1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
2
|
Chris@16
|
3 #include <boost/proto/detail/preprocessed/deduce_domain_n.hpp>
|
Chris@16
|
4
|
Chris@16
|
5 #elif !defined(BOOST_PP_IS_ITERATING)
|
Chris@16
|
6
|
Chris@16
|
7 #define BOOST_PROTO_COMMON_DOMAIN2(Z, N, DATA) \
|
Chris@16
|
8 typedef \
|
Chris@16
|
9 typename common_domain2<common ## N, A ## N>::type \
|
Chris@16
|
10 BOOST_PP_CAT(common, BOOST_PP_INC(N)); \
|
Chris@16
|
11 /**/
|
Chris@16
|
12
|
Chris@16
|
13 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
14 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deduce_domain_n.hpp")
|
Chris@16
|
15 #endif
|
Chris@16
|
16
|
Chris@16
|
17 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
18 // deduce_domain_n.hpp
|
Chris@16
|
19 // Definitions of common_domain[n] and deduce_domain[n] class templates.
|
Chris@16
|
20 //
|
Chris@16
|
21 // Copyright 2008 Eric Niebler. Distributed under the Boost
|
Chris@16
|
22 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
23 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
24
|
Chris@16
|
25 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
26 #pragma wave option(preserve: 1)
|
Chris@16
|
27 #endif
|
Chris@16
|
28
|
Chris@16
|
29 #define BOOST_PP_ITERATION_PARAMS_1 \
|
Chris@16
|
30 (3, (3, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/deduce_domain_n.hpp>))
|
Chris@16
|
31 #include BOOST_PP_ITERATE()
|
Chris@16
|
32
|
Chris@16
|
33 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
34 #pragma wave option(output: null)
|
Chris@16
|
35 #endif
|
Chris@16
|
36
|
Chris@16
|
37 #undef BOOST_PROTO_COMMON_DOMAIN2
|
Chris@16
|
38
|
Chris@16
|
39 #else
|
Chris@16
|
40
|
Chris@16
|
41 #define N BOOST_PP_ITERATION()
|
Chris@16
|
42
|
Chris@16
|
43 template<BOOST_PP_ENUM_PARAMS(N, typename A)>
|
Chris@16
|
44 struct BOOST_PP_CAT(common_domain, N)
|
Chris@16
|
45 {
|
Chris@16
|
46 typedef A0 common1;
|
Chris@16
|
47 BOOST_PP_REPEAT_FROM_TO(1, N, BOOST_PROTO_COMMON_DOMAIN2, ~)
|
Chris@16
|
48 typedef BOOST_PP_CAT(common, N) type;
|
Chris@16
|
49 BOOST_PROTO_ASSERT_VALID_DOMAIN(type);
|
Chris@16
|
50 };
|
Chris@16
|
51
|
Chris@16
|
52 template<BOOST_PP_ENUM_PARAMS(N, typename E)>
|
Chris@16
|
53 struct BOOST_PP_CAT(deduce_domain, N)
|
Chris@16
|
54 : BOOST_PP_CAT(common_domain, N)<
|
Chris@16
|
55 BOOST_PP_ENUM_BINARY_PARAMS(
|
Chris@16
|
56 N
|
Chris@16
|
57 , typename domain_of<E, >::type BOOST_PP_INTERCEPT
|
Chris@16
|
58 )
|
Chris@16
|
59 >
|
Chris@16
|
60 {};
|
Chris@16
|
61
|
Chris@16
|
62 #undef N
|
Chris@16
|
63
|
Chris@16
|
64 #endif // BOOST_PROTO_DONT_USE_PREPROCESSED_FILES
|