2 // (C) Copyright Tobias Schwinger
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 #ifndef BOOST_FT_DETAIL_SYNTHESIZE_HPP_INCLUDED
10 #define BOOST_FT_DETAIL_SYNTHESIZE_HPP_INCLUDED
14 #include <boost/mpl/at.hpp>
15 #include <boost/mpl/size.hpp>
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>
22 namespace boost { namespace function_types { namespace detail {
24 template<bits_t Flags, bits_t CCID, std::size_t Size>
25 struct synthesize_impl_o
27 template<typename Seq> struct synthesize_impl_i { };
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
37 ::template synthesize_impl_i<Seq>
40 template<typename Seq, typename Tag>
41 struct synthesize_func
42 : detail::synthesize_impl
44 , ::boost::function_types::detail::bits
45 < detail::retag_default_cc
46 < function_types::tag<nv_dcc_func, Tag> >
51 template<typename Seq, typename Tag>
53 : detail::synthesize_impl
55 , ::boost::function_types::detail::bits
56 < detail::retag_default_cc
58 < typename detail::cv_traits< typename mpl::at_c<Seq,1>::type >::tag
65 template<typename S, typename R = typename mpl::at_c<S,0>::type,
66 typename C = typename mpl::at_c<S,1>::type>
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>
76 } } } // namespace ::boost::function_types::detail