function.hpp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Boost.Function library
  2. // Copyright Douglas Gregor 2001-2003. Use, modification and
  3. // distribution is subject to the Boost Software License, Version
  4. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. // For more information, see http://www.boost.org/libs/function
  7. // William Kempf, Jesse Jones and Karl Nelson were all very helpful in the
  8. // design of this library.
  9. #ifndef BOOST_FUNCTION_MAX_ARGS
  10. # define BOOST_FUNCTION_MAX_ARGS 10
  11. #endif // BOOST_FUNCTION_MAX_ARGS
  12. #if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
  13. #if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED)
  14. #define BOOST_FUNCTION_MAX_ARGS_DEFINED 0
  15. #endif
  16. #include <functional> // unary_function, binary_function
  17. #include <boost/preprocessor/iterate.hpp>
  18. #include <boost/config/workaround.hpp>
  19. // Include the prologue here so that the use of file-level iteration
  20. // in anything that may be included by function_template.hpp doesn't break
  21. #include <boost/function/detail/prologue.hpp>
  22. // Older Visual Age C++ version do not handle the file iteration well
  23. #if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800)
  24. # if BOOST_FUNCTION_MAX_ARGS >= 0
  25. # include <boost/function/function0.hpp>
  26. # endif
  27. # if BOOST_FUNCTION_MAX_ARGS >= 1
  28. # include <boost/function/function1.hpp>
  29. # endif
  30. # if BOOST_FUNCTION_MAX_ARGS >= 2
  31. # include <boost/function/function2.hpp>
  32. # endif
  33. # if BOOST_FUNCTION_MAX_ARGS >= 3
  34. # include <boost/function/function3.hpp>
  35. # endif
  36. # if BOOST_FUNCTION_MAX_ARGS >= 4
  37. # include <boost/function/function4.hpp>
  38. # endif
  39. # if BOOST_FUNCTION_MAX_ARGS >= 5
  40. # include <boost/function/function5.hpp>
  41. # endif
  42. # if BOOST_FUNCTION_MAX_ARGS >= 6
  43. # include <boost/function/function6.hpp>
  44. # endif
  45. # if BOOST_FUNCTION_MAX_ARGS >= 7
  46. # include <boost/function/function7.hpp>
  47. # endif
  48. # if BOOST_FUNCTION_MAX_ARGS >= 8
  49. # include <boost/function/function8.hpp>
  50. # endif
  51. # if BOOST_FUNCTION_MAX_ARGS >= 9
  52. # include <boost/function/function9.hpp>
  53. # endif
  54. # if BOOST_FUNCTION_MAX_ARGS >= 10
  55. # include <boost/function/function10.hpp>
  56. # endif
  57. #else
  58. // What is the '3' for?
  59. # define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,<boost/function/detail/function_iterate.hpp>))
  60. # include BOOST_PP_ITERATE()
  61. # undef BOOST_PP_ITERATION_PARAMS_1
  62. #endif
  63. #endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)