Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 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 <ndnboost/mpl/at.hpp> |
| 15 | #include <ndnboost/mpl/size.hpp> |
| 16 | |
| 17 | #include <ndnboost/function_types/config/config.hpp> |
| 18 | #include <ndnboost/function_types/property_tags.hpp> |
| 19 | #include <ndnboost/function_types/detail/cv_traits.hpp> |
| 20 | #include <ndnboost/function_types/detail/retag_default_cc.hpp> |
| 21 | |
| 22 | namespace ndnboost { 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 | < ::ndnboost::function_types::detail::decode_bits<Bits>::flags |
| 34 | , ::ndnboost::function_types::detail::decode_bits<Bits>::cc_id |
| 35 | , ::ndnboost::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 | , ::ndnboost::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 | , ::ndnboost::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 |
Jeff Thompson | 9939dcd | 2013-10-15 15:12:24 -0700 | [diff] [blame^] | 73 | #define BOOST_FT_al_path ndnboost/function_types/detail/synthesize_impl |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 74 | #include <ndnboost/function_types/detail/pp_loop.hpp> |
| 75 | |
| 76 | } } } // namespace ::ndnboost::function_types::detail |
| 77 | |
| 78 | #endif |
| 79 | |