2
// Copyright Oliver Kowalke 2009.
3
// Distributed under the Boost Software License, Version 1.0.
4
// (See accompanying file LICENSE_1_0.txt or copy at
5
// http://www.boost.org/LICENSE_1_0.txt)
7
#ifndef BOOST_COROUTINES_DETAIL_COROUTINE_OBJECT_H
8
#define BOOST_COROUTINES_DETAIL_COROUTINE_OBJECT_H
10
#include <boost/assert.hpp>
11
#include <boost/config.hpp>
12
#include <boost/cstdint.hpp>
13
#include <boost/exception_ptr.hpp>
14
#include <boost/move/move.hpp>
15
#include <boost/ref.hpp>
16
#include <boost/tuple/tuple.hpp>
17
#include <boost/type_traits/function_traits.hpp>
19
#include <boost/coroutine/attributes.hpp>
20
#include <boost/coroutine/detail/arg.hpp>
21
#include <boost/coroutine/detail/config.hpp>
22
#include <boost/coroutine/detail/coroutine_base.hpp>
23
#include <boost/coroutine/detail/exceptions.hpp>
24
#include <boost/coroutine/detail/flags.hpp>
25
#include <boost/coroutine/detail/holder.hpp>
26
#include <boost/coroutine/detail/param.hpp>
27
#include <boost/coroutine/flags.hpp>
29
#ifdef BOOST_HAS_ABI_HEADERS
30
# include BOOST_ABI_PREFIX
34
namespace coroutines {
37
template< typename Coroutine >
38
void trampoline1( intptr_t vp)
42
reinterpret_cast< Coroutine * >( vp)->run();
45
template< typename Coroutine, typename Arg >
46
void trampoline2( intptr_t vp)
50
tuple< Coroutine *, Arg > * tpl(
51
reinterpret_cast< tuple< Coroutine *, Arg > * >( vp) );
52
Coroutine * coro( get< 0 >( * tpl) );
53
Arg arg( get< 1 >( * tpl) );
60
typename Fn, typename StackAllocator, typename Allocator,
62
typename Result, int arity
64
class coroutine_object;
66
#include <boost/coroutine/detail/coroutine_object_void_0.ipp>
67
#include <boost/coroutine/detail/coroutine_object_void_1.ipp>
68
#include <boost/coroutine/detail/coroutine_object_void_arity.ipp>
69
#include <boost/coroutine/detail/coroutine_object_result_0.ipp>
70
#include <boost/coroutine/detail/coroutine_object_result_1.ipp>
71
#include <boost/coroutine/detail/coroutine_object_result_arity.ipp>
75
#ifdef BOOST_HAS_ABI_HEADERS
76
# include BOOST_ABI_SUFFIX
79
#endif // BOOST_COROUTINES_DETAIL_COROUTINE_OBJECT_H