Pack required boost code together.
[xy_vsfilter.git] / src / thirdparty / boost_1_47_0 / boost / function_types / detail / synthesize_impl / master.hpp
blob131be3d42a7c588009ac6ed5fac9221b5738d480
2 // (C) Copyright Tobias Schwinger
3 //
4 // Use modification and distribution are subject to the boost Software License,
5 // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
7 //------------------------------------------------------------------------------
9 // no include guards, this file is intended for multiple inclusion
11 #if BOOST_FT_ARITY_LOOP_PREFIX
13 # ifndef BOOST_FT_DETAIL_SYNTHESIZE_IMPL_MASTER_HPP_INCLUDED
14 # define BOOST_FT_DETAIL_SYNTHESIZE_IMPL_MASTER_HPP_INCLUDED
15 # include <boost/preprocessor/cat.hpp>
16 # include <boost/preprocessor/arithmetic/dec.hpp>
17 # include <boost/preprocessor/iteration/local.hpp>
18 # include <boost/preprocessor/facilities/empty.hpp>
19 # include <boost/preprocessor/facilities/identity.hpp>
20 # endif
22 # define BOOST_FT_type_name type
24 # ifdef BOOST_FT_flags
25 # define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity)
26 # define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity
27 # else
28 BOOST_PP_EXPAND(#) define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity)
29 BOOST_PP_EXPAND(#) define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity
30 # endif
32 # define BOOST_FT_iter(i) BOOST_PP_CAT(iter_,i)
34 #elif BOOST_FT_ARITY_LOOP_IS_ITERATING
36 template< BOOST_FT_tplargs(BOOST_PP_IDENTITY(typename)) >
37 struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,BOOST_FT_arity)
39 typedef BOOST_FT_type ;
42 template<>
43 struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, BOOST_FT_n >
45 template<typename S> struct synthesize_impl_i
47 private:
48 typedef typename mpl::begin<S>::type BOOST_FT_iter(0);
49 # if BOOST_FT_n > 1
50 # define BOOST_PP_LOCAL_MACRO(i) typedef typename mpl::next< \
51 BOOST_FT_iter(BOOST_PP_DEC(i)) >::type BOOST_FT_iter(i);
52 # define BOOST_PP_LOCAL_LIMITS (1,BOOST_FT_n-1)
53 # include BOOST_PP_LOCAL_ITERATE()
54 # endif
55 public:
56 typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,BOOST_FT_arity)
57 < typename mpl::deref< BOOST_FT_iter(0) >::type
58 # if BOOST_FT_mfp
59 , typename detail::cv_traits<
60 typename mpl::deref< BOOST_FT_iter(1) >::type >::type
61 # endif
62 # if BOOST_FT_n > (BOOST_FT_mfp+1)
63 # define BOOST_PP_LOCAL_LIMITS (BOOST_FT_mfp+1,BOOST_FT_n-1)
64 # define BOOST_PP_LOCAL_MACRO(i) \
65 , typename mpl::deref< BOOST_FT_iter(i) >::type
66 # include BOOST_PP_LOCAL_ITERATE()
67 # endif
68 >::type type;
72 #elif BOOST_FT_ARITY_LOOP_SUFFIX
74 # ifdef BOOST_FT_flags
75 # undef BOOST_FT_make_type
76 # undef BOOST_FT_make_type_impl
77 # else
78 BOOST_PP_EXPAND(#) undef BOOST_FT_make_type
79 BOOST_PP_EXPAND(#) undef BOOST_FT_make_type_impl
80 # endif
81 # undef BOOST_FT_iter
82 # undef BOOST_FT_type_name
84 #else
85 # error "attempt to use arity loop master file without loop"
86 #endif