function.hpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. #include <functional> // unary_function, binary_function
  10. #include <boost/preprocessor/iterate.hpp>
  11. #include <boost/detail/workaround.hpp>
  12. #ifndef BOOST_FUNCTION_MAX_ARGS
  13. # define BOOST_FUNCTION_MAX_ARGS 10
  14. #endif // BOOST_FUNCTION_MAX_ARGS
  15. // Include the prologue here so that the use of file-level iteration
  16. // in anything that may be included by function_template.hpp doesn't break
  17. #include <boost/function/detail/prologue.hpp>
  18. // Visual Age C++ doesn't handle the file iteration well
  19. #if BOOST_WORKAROUND(__IBMCPP__, >= 500)
  20. # if BOOST_FUNCTION_MAX_ARGS >= 0
  21. # include <boost/function/function0.hpp>
  22. # endif
  23. # if BOOST_FUNCTION_MAX_ARGS >= 1
  24. # include <boost/function/function1.hpp>
  25. # endif
  26. # if BOOST_FUNCTION_MAX_ARGS >= 2
  27. # include <boost/function/function2.hpp>
  28. # endif
  29. # if BOOST_FUNCTION_MAX_ARGS >= 3
  30. # include <boost/function/function3.hpp>
  31. # endif
  32. # if BOOST_FUNCTION_MAX_ARGS >= 4
  33. # include <boost/function/function4.hpp>
  34. # endif
  35. # if BOOST_FUNCTION_MAX_ARGS >= 5
  36. # include <boost/function/function5.hpp>
  37. # endif
  38. # if BOOST_FUNCTION_MAX_ARGS >= 6
  39. # include <boost/function/function6.hpp>
  40. # endif
  41. # if BOOST_FUNCTION_MAX_ARGS >= 7
  42. # include <boost/function/function7.hpp>
  43. # endif
  44. # if BOOST_FUNCTION_MAX_ARGS >= 8
  45. # include <boost/function/function8.hpp>
  46. # endif
  47. # if BOOST_FUNCTION_MAX_ARGS >= 9
  48. # include <boost/function/function9.hpp>
  49. # endif
  50. # if BOOST_FUNCTION_MAX_ARGS >= 10
  51. # include <boost/function/function10.hpp>
  52. # endif
  53. #else
  54. // What is the '3' for?
  55. # define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,<boost/function/detail/function_iterate.hpp>))
  56. # include BOOST_PP_ITERATE()
  57. # undef BOOST_PP_ITERATION_PARAMS_1
  58. #endif