pp_loop.hpp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 intended for multiple inclusions
  7. #ifndef BOOST_FT_DETAIL_PP_LOOP_HPP_INCLUDED
  8. #define BOOST_FT_DETAIL_PP_LOOP_HPP_INCLUDED
  9. # include <boost/preprocessor/facilities/expand.hpp>
  10. # include <boost/preprocessor/facilities/empty.hpp>
  11. # include <boost/preprocessor/punctuation/paren.hpp>
  12. #endif
  13. #include <boost/function_types/detail/encoding/def.hpp>
  14. #include <boost/function_types/detail/encoding/aliases_def.hpp>
  15. #if defined(BOOST_FT_PREPROCESSING_MODE)
  16. # define BOOST_FT_loop <boost/function_types/detail/pp_cc_loop/master.hpp>
  17. #else
  18. # define BOOST_FT_loop \
  19. <boost/function_types/detail/pp_cc_loop/preprocessed.hpp>
  20. #endif
  21. #if defined(BOOST_FT_al_path)
  22. # define BOOST_FT_cc_file \
  23. <boost/function_types/detail/pp_variate_loop/preprocessed.hpp>
  24. # define BOOST_FT_variate_file \
  25. <boost/function_types/detail/pp_arity_loop.hpp>
  26. # ifndef BOOST_FT_type_function
  27. # define BOOST_FT_type_function(cc,name) BOOST_FT_SYNTAX( \
  28. R BOOST_PP_EMPTY,BOOST_PP_EMPTY,cc,BOOST_PP_EMPTY,name,BOOST_PP_EMPTY)
  29. # endif
  30. # ifndef BOOST_FT_type_function_pointer
  31. # define BOOST_FT_type_function_pointer(cc,name) BOOST_FT_SYNTAX( \
  32. R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,* BOOST_PP_EMPTY,name,BOOST_PP_RPAREN)
  33. # endif
  34. # ifndef BOOST_FT_type_function_reference
  35. # define BOOST_FT_type_function_reference(cc,name) BOOST_FT_SYNTAX( \
  36. R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,& BOOST_PP_EMPTY,name,BOOST_PP_RPAREN)
  37. # endif
  38. # ifndef BOOST_FT_type_member_function_pointer
  39. # define BOOST_FT_type_member_function_pointer(cc,name) BOOST_FT_SYNTAX( \
  40. R BOOST_PP_EMPTY,BOOST_PP_LPAREN,cc,T0::* BOOST_PP_EMPTY,name,BOOST_PP_RPAREN)
  41. # endif
  42. # include BOOST_FT_loop
  43. # undef BOOST_FT_type_function
  44. # undef BOOST_FT_type_function_pointer
  45. # undef BOOST_FT_type_function_reference
  46. # undef BOOST_FT_type_member_function_pointer
  47. # undef BOOST_FT_variations
  48. # undef BOOST_FT_variate_file
  49. # undef BOOST_FT_cc_file
  50. # undef BOOST_FT_al_path
  51. #elif defined(BOOST_FT_cc_file)
  52. # include BOOST_FT_loop
  53. # undef BOOST_FT_cc_file
  54. #else
  55. # error "argument missing"
  56. #endif
  57. #undef BOOST_FT_loop
  58. #include <boost/function_types/detail/encoding/aliases_undef.hpp>
  59. #include <boost/function_types/detail/encoding/undef.hpp>