annotate DEPENDENCIES/generic/include/boost/coroutine/detail/setup.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents f46d142149f5
children
rev   line source
Chris@102 1
Chris@102 2 // Copyright Oliver Kowalke 2009.
Chris@102 3 // Distributed under the Boost Software License, Version 1.0.
Chris@102 4 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@102 5 // http://www.boost.org/LICENSE_1_0.txt)
Chris@102 6
Chris@102 7 #ifndef BOOST_COROUTINES_DETAIL_SETUP_H
Chris@102 8 #define BOOST_COROUTINES_DETAIL_SETUP_H
Chris@102 9
Chris@102 10 #include <boost/assert.hpp>
Chris@102 11 #include <boost/config.hpp>
Chris@102 12 #include <boost/move/move.hpp>
Chris@102 13 #include <boost/type_traits/decay.hpp>
Chris@102 14 #include <boost/type_traits/is_convertible.hpp>
Chris@102 15 #include <boost/type_traits/is_same.hpp>
Chris@102 16
Chris@102 17 #include <boost/coroutine/attributes.hpp>
Chris@102 18 #include <boost/coroutine/detail/coroutine_context.hpp>
Chris@102 19 #include <boost/coroutine/detail/flags.hpp>
Chris@102 20
Chris@102 21 #ifdef BOOST_HAS_ABI_HEADERS
Chris@102 22 # include BOOST_ABI_PREFIX
Chris@102 23 #endif
Chris@102 24
Chris@102 25 namespace boost {
Chris@102 26 namespace coroutines {
Chris@102 27 namespace detail {
Chris@102 28
Chris@102 29 template< typename Fn >
Chris@102 30 struct setup
Chris@102 31 {
Chris@102 32 struct dummy {};
Chris@102 33
Chris@102 34 Fn fn;
Chris@102 35 coroutine_context * caller;
Chris@102 36 coroutine_context * callee;
Chris@102 37 attributes attr;
Chris@102 38
Chris@102 39 #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
Chris@102 40 setup( Fn fn_,
Chris@102 41 coroutine_context * caller_,
Chris@102 42 coroutine_context * callee_,
Chris@102 43 attributes const& attr_) :
Chris@102 44 fn( boost::forward< Fn >( fn_) ),
Chris@102 45 caller( caller_),
Chris@102 46 callee( callee_),
Chris@102 47 attr( attr_)
Chris@102 48 {}
Chris@102 49 #endif
Chris@102 50 setup( BOOST_RV_REF( Fn) fn_,
Chris@102 51 coroutine_context * caller_,
Chris@102 52 coroutine_context * callee_,
Chris@102 53 attributes const& attr_,
Chris@102 54 typename disable_if<
Chris@102 55 is_same< typename decay< Fn >::type, setup >,
Chris@102 56 dummy*
Chris@102 57 >::type = 0) :
Chris@102 58 #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
Chris@102 59 fn( fn_),
Chris@102 60 #else
Chris@102 61 fn( boost::forward< Fn >( fn_) ),
Chris@102 62 #endif
Chris@102 63 caller( caller_),
Chris@102 64 callee( callee_),
Chris@102 65 attr( attr_)
Chris@102 66 {}
Chris@102 67 };
Chris@102 68
Chris@102 69 }}}
Chris@102 70
Chris@102 71 #ifdef BOOST_HAS_ABI_HEADERS
Chris@102 72 # include BOOST_ABI_SUFFIX
Chris@102 73 #endif
Chris@102 74
Chris@102 75 #endif // BOOST_COROUTINES_DETAIL_SETUP_H