push_coroutine_synthesized.hpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Copyright Oliver Kowalke 2009.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_SYNTHESIZED_H
  6. #define BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_SYNTHESIZED_H
  7. #include <boost/config.hpp>
  8. #include <boost/coroutine/detail/config.hpp>
  9. #include <boost/coroutine/detail/coroutine_context.hpp>
  10. #include <boost/coroutine/detail/push_coroutine_impl.hpp>
  11. #ifdef BOOST_HAS_ABI_HEADERS
  12. # include BOOST_ABI_PREFIX
  13. #endif
  14. namespace boost {
  15. namespace coroutines {
  16. namespace detail {
  17. template< typename R >
  18. class push_coroutine_synthesized : public push_coroutine_impl< R >
  19. {
  20. private:
  21. typedef push_coroutine_impl< R > impl_t;
  22. public:
  23. push_coroutine_synthesized( coroutine_context * caller,
  24. coroutine_context * callee,
  25. bool unwind) :
  26. impl_t( caller, callee, unwind)
  27. {}
  28. void destroy() {}
  29. };
  30. template< typename R >
  31. class push_coroutine_synthesized< R & > : public push_coroutine_impl< R & >
  32. {
  33. private:
  34. typedef push_coroutine_impl< R & > impl_t;
  35. public:
  36. push_coroutine_synthesized( coroutine_context * caller,
  37. coroutine_context * callee,
  38. bool unwind) :
  39. impl_t( caller, callee, unwind)
  40. {}
  41. void destroy() {}
  42. };
  43. template<>
  44. class push_coroutine_synthesized< void > : public push_coroutine_impl< void >
  45. {
  46. private:
  47. typedef push_coroutine_impl< void > impl_t;
  48. public:
  49. push_coroutine_synthesized( coroutine_context * caller,
  50. coroutine_context * callee,
  51. bool unwind) :
  52. impl_t( caller, callee, unwind)
  53. {}
  54. inline void destroy() {}
  55. };
  56. }}}
  57. #ifdef BOOST_HAS_ABI_HEADERS
  58. # include BOOST_ABI_SUFFIX
  59. #endif
  60. #endif // BOOST_COROUTINES_DETAIL_PUSH_COROUTINE_SYNTHESIZED_H