blob: 2b0f2f8edcb6bb97d27d044cfb067b8a416875e2 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
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// no include guards, this file is guarded externally
10
11#ifdef __WAVE__
12// this file has been generated from the master.hpp file in the same directory
13# pragma wave option(preserve: 0)
14#endif
15
16#if !defined(BOOST_PP_VALUE)
17# include <ndnboost/preprocessor/slot/slot.hpp>
18# include <ndnboost/preprocessor/iteration/self.hpp>
19
20# include <ndnboost/function_types/detail/encoding/def.hpp>
21# include <ndnboost/function_types/detail/encoding/aliases_def.hpp>
22
23namespace ndnboost { namespace function_types {
24
25namespace detail
26{
27 template<class Tag, class RefTag> struct selector_bits
28 {
29# define BOOST_PP_VALUE non_member|member|non_variadic|variadic
30# include BOOST_PP_ASSIGN_SLOT(1)
31
32 BOOST_STATIC_CONSTANT(bits_t, value = (
33 (::ndnboost::function_types::detail::bits<Tag>::value & BOOST_FT_default_cc)
34 | (::ndnboost::function_types::detail::bits<RefTag>::value & BOOST_PP_SLOT(1))
35 ));
36 };
37
38 template<bits_t SelectorBits> struct default_cc_tag;
39
40 template<class Tag, class RefTag> struct retag_default_cc
41 : detail::compound_tag
42 < Tag, detail::default_cc_tag<
43 ::ndnboost::function_types::detail::selector_bits<Tag,RefTag>::value > >
44 { };
45
46 template<bits_t SelectorBits> struct default_cc_tag
47 {
48 typedef null_tag::bits bits;
49 typedef null_tag::mask mask;
50 };
51
52 class test_class;
53 typedef constant<BOOST_FT_cc_mask> cc_mask_constant;
54
55# define BOOST_FT_self \
56 <ndnboost/function_types/detail/pp_retag_default_cc/master.hpp>
57
58# define default_cc_ BOOST_FT_default_cc
59
60# define BOOST_PP_VALUE default_cc_|non_member|non_variadic
61# define BOOST_FT_tester void (*tester)()
62# define BOOST_PP_INDIRECT_SELF BOOST_FT_self
63# include BOOST_PP_INCLUDE_SELF()
64
65# define BOOST_PP_VALUE default_cc_|non_member|variadic
66# define BOOST_FT_tester void (*tester)(...)
67# define BOOST_PP_INDIRECT_SELF BOOST_FT_self
68# include BOOST_PP_INCLUDE_SELF()
69
70# define BOOST_PP_VALUE default_cc_|member|non_variadic
71# define BOOST_FT_tester void (test_class::*tester)()
72# define BOOST_PP_INDIRECT_SELF BOOST_FT_self
73# include BOOST_PP_INCLUDE_SELF()
74
75# define BOOST_PP_VALUE default_cc_|member|variadic
76# define BOOST_FT_tester void (test_class::*tester)(...)
77# define BOOST_PP_INDIRECT_SELF BOOST_FT_self
78# include BOOST_PP_INCLUDE_SELF()
79
80# undef default_cc_
81
82# undef BOOST_FT_self
83
84} } } // namespace ::ndnboost::function_types::detail
85
86# include <ndnboost/function_types/detail/encoding/aliases_undef.hpp>
87# include <ndnboost/function_types/detail/encoding/undef.hpp>
88
89#else // if defined(BOOST_PP_VALUE)
90
91# include BOOST_PP_ASSIGN_SLOT(1)
92
93 template<> struct default_cc_tag<BOOST_PP_SLOT(1)>
94 {
95 typedef BOOST_FT_tester;
96 typedef mpl::bitand_<components<tester>::bits,cc_mask_constant> bits;
97 typedef cc_mask_constant mask;
98 };
99
100# undef BOOST_FT_tester
101
102#endif
103