]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | |
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). | |
6 | ||
7 | //------------------------------------------------------------------------------ | |
8 | ||
9 | #ifndef BOOST_FT_DETAIL_SYNTHESIZE_HPP_INCLUDED | |
10 | #define BOOST_FT_DETAIL_SYNTHESIZE_HPP_INCLUDED | |
11 | ||
12 | #include <cstddef> | |
13 | ||
14 | #include <boost/mpl/at.hpp> | |
15 | #include <boost/mpl/size.hpp> | |
16 | ||
17 | #include <boost/function_types/config/config.hpp> | |
18 | #include <boost/function_types/property_tags.hpp> | |
19 | #include <boost/function_types/detail/cv_traits.hpp> | |
20 | #include <boost/function_types/detail/retag_default_cc.hpp> | |
21 | ||
22 | namespace boost { namespace function_types { namespace detail { | |
23 | ||
24 | template<bits_t Flags, bits_t CCID, std::size_t Size> | |
25 | struct synthesize_impl_o | |
26 | { | |
27 | template<typename Seq> struct synthesize_impl_i { }; | |
28 | }; | |
29 | ||
30 | template<typename Seq, bits_t Bits> | |
31 | struct synthesize_impl | |
32 | : detail::synthesize_impl_o | |
33 | < ::boost::function_types::detail::decode_bits<Bits>::flags | |
34 | , ::boost::function_types::detail::decode_bits<Bits>::cc_id | |
35 | , ::boost::mpl::size<Seq>::value | |
36 | > | |
37 | ::template synthesize_impl_i<Seq> | |
38 | { }; | |
39 | ||
40 | template<typename Seq, typename Tag> | |
41 | struct synthesize_func | |
42 | : detail::synthesize_impl | |
43 | < Seq | |
44 | , ::boost::function_types::detail::bits | |
45 | < detail::retag_default_cc | |
46 | < function_types::tag<nv_dcc_func, Tag> > | |
47 | >::value | |
48 | > | |
49 | { }; | |
50 | ||
51 | template<typename Seq, typename Tag> | |
52 | struct synthesize_mfp | |
53 | : detail::synthesize_impl | |
54 | < Seq | |
55 | , ::boost::function_types::detail::bits | |
56 | < detail::retag_default_cc | |
57 | < function_types::tag | |
58 | < typename detail::cv_traits< typename mpl::at_c<Seq,1>::type >::tag | |
59 | , nv_dcc_mfp, Tag | |
60 | > > | |
61 | >::value | |
62 | > | |
63 | { }; | |
64 | ||
65 | template<typename S, typename R = typename mpl::at_c<S,0>::type, | |
66 | typename C = typename mpl::at_c<S,1>::type> | |
67 | struct synthesize_mop | |
68 | { | |
69 | typedef R C::* type; | |
70 | }; | |
71 | ||
72 | #define BOOST_FT_variations BOOST_FT_function|BOOST_FT_member_pointer | |
73 | #define BOOST_FT_al_path boost/function_types/detail/synthesize_impl | |
74 | #include <boost/function_types/detail/pp_loop.hpp> | |
75 | ||
76 | } } } // namespace ::boost::function_types::detail | |
77 | ||
78 | #endif | |
79 |