master.hpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // (C) Copyright Tobias Schwinger
  2. //
  3. // Use modification and distribution are subject to the boost Software License,
  4. // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
  5. //------------------------------------------------------------------------------
  6. // no include guards, this file is guarded externally
  7. #ifdef __WAVE__
  8. // this file has been generated from the master.hpp file in the same directory
  9. # pragma wave option(preserve: 0)
  10. #endif
  11. #if !defined(BOOST_PP_VALUE)
  12. # include <boost/preprocessor/slot/slot.hpp>
  13. # include <boost/preprocessor/iteration/self.hpp>
  14. # include <boost/function_types/detail/encoding/def.hpp>
  15. # include <boost/function_types/detail/encoding/aliases_def.hpp>
  16. namespace boost { namespace function_types {
  17. namespace detail
  18. {
  19. template<class Tag, class RefTag> struct selector_bits
  20. {
  21. # define BOOST_PP_VALUE non_member|member|non_variadic|variadic
  22. # include BOOST_PP_ASSIGN_SLOT(1)
  23. BOOST_STATIC_CONSTANT(bits_t, value = (
  24. (::boost::function_types::detail::bits<Tag>::value & BOOST_FT_default_cc)
  25. | (::boost::function_types::detail::bits<RefTag>::value & BOOST_PP_SLOT(1))
  26. ));
  27. };
  28. template<bits_t SelectorBits> struct default_cc_tag;
  29. template<class Tag, class RefTag> struct retag_default_cc
  30. : detail::compound_tag
  31. < Tag, detail::default_cc_tag<
  32. ::boost::function_types::detail::selector_bits<Tag,RefTag>::value > >
  33. { };
  34. template<bits_t SelectorBits> struct default_cc_tag
  35. {
  36. typedef null_tag::bits bits;
  37. typedef null_tag::mask mask;
  38. };
  39. class test_class;
  40. typedef constant<BOOST_FT_cc_mask> cc_mask_constant;
  41. # define BOOST_FT_self \
  42. <boost/function_types/detail/pp_retag_default_cc/master.hpp>
  43. # define default_cc_ BOOST_FT_default_cc
  44. # define BOOST_PP_VALUE default_cc_|non_member|non_variadic
  45. # define BOOST_FT_tester void (*tester)()
  46. # define BOOST_PP_INDIRECT_SELF BOOST_FT_self
  47. # include BOOST_PP_INCLUDE_SELF()
  48. # define BOOST_PP_VALUE default_cc_|non_member|variadic
  49. # define BOOST_FT_tester void (*tester)(...)
  50. # define BOOST_PP_INDIRECT_SELF BOOST_FT_self
  51. # include BOOST_PP_INCLUDE_SELF()
  52. # define BOOST_PP_VALUE default_cc_|member|non_variadic
  53. # define BOOST_FT_tester void (test_class::*tester)()
  54. # define BOOST_PP_INDIRECT_SELF BOOST_FT_self
  55. # include BOOST_PP_INCLUDE_SELF()
  56. # define BOOST_PP_VALUE default_cc_|member|variadic
  57. # define BOOST_FT_tester void (test_class::*tester)(...)
  58. # define BOOST_PP_INDIRECT_SELF BOOST_FT_self
  59. # include BOOST_PP_INCLUDE_SELF()
  60. # undef default_cc_
  61. # undef BOOST_FT_self
  62. } } } // namespace ::boost::function_types::detail
  63. # include <boost/function_types/detail/encoding/aliases_undef.hpp>
  64. # include <boost/function_types/detail/encoding/undef.hpp>
  65. #else // if defined(BOOST_PP_VALUE)
  66. # include BOOST_PP_ASSIGN_SLOT(1)
  67. template<> struct default_cc_tag<BOOST_PP_SLOT(1)>
  68. {
  69. typedef BOOST_FT_tester;
  70. typedef mpl::bitand_<components<tester>::bits,cc_mask_constant> bits;
  71. typedef cc_mask_constant mask;
  72. };
  73. # undef BOOST_FT_tester
  74. #endif