function_fwd.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Boost.Function library
  2. // Copyright (C) Douglas Gregor 2008
  3. //
  4. // Use, modification and distribution is subject to the Boost
  5. // Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // For more information, see http://www.boost.org
  9. #ifndef BOOST_FUNCTION_FWD_HPP
  10. #define BOOST_FUNCTION_FWD_HPP
  11. #include <boost/config.hpp>
  12. #if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG)
  13. // Work around a compiler bug.
  14. // boost::python::objects::function has to be seen by the compiler before the
  15. // boost::function class template.
  16. namespace boost { namespace python { namespace objects {
  17. class function;
  18. }}}
  19. #endif
  20. #if defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \
  21. || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540)
  22. # define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX
  23. #endif
  24. namespace boost {
  25. class bad_function_call;
  26. #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
  27. // Preferred syntax
  28. template<typename Signature> class function;
  29. template<typename Signature>
  30. inline void swap(function<Signature>& f1, function<Signature>& f2)
  31. {
  32. f1.swap(f2);
  33. }
  34. #endif // have partial specialization
  35. // Portable syntax
  36. template<typename R> class function0;
  37. template<typename R, typename T1> class function1;
  38. template<typename R, typename T1, typename T2> class function2;
  39. template<typename R, typename T1, typename T2, typename T3> class function3;
  40. template<typename R, typename T1, typename T2, typename T3, typename T4>
  41. class function4;
  42. template<typename R, typename T1, typename T2, typename T3, typename T4,
  43. typename T5>
  44. class function5;
  45. template<typename R, typename T1, typename T2, typename T3, typename T4,
  46. typename T5, typename T6>
  47. class function6;
  48. template<typename R, typename T1, typename T2, typename T3, typename T4,
  49. typename T5, typename T6, typename T7>
  50. class function7;
  51. template<typename R, typename T1, typename T2, typename T3, typename T4,
  52. typename T5, typename T6, typename T7, typename T8>
  53. class function8;
  54. template<typename R, typename T1, typename T2, typename T3, typename T4,
  55. typename T5, typename T6, typename T7, typename T8, typename T9>
  56. class function9;
  57. template<typename R, typename T1, typename T2, typename T3, typename T4,
  58. typename T5, typename T6, typename T7, typename T8, typename T9,
  59. typename T10>
  60. class function10;
  61. }
  62. #endif