annotate DEPENDENCIES/generic/include/boost/coroutine/detail/stack_tuple.hpp @ 99:5f61994de79a emscripten

Update subrepos
author Chris Cannam
date Fri, 04 Sep 2015 10:46:42 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1
Chris@16 2 // Copyright Oliver Kowalke 2009.
Chris@16 3 // Distributed under the Boost Software License, Version 1.0.
Chris@16 4 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 5 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 6
Chris@16 7 #ifndef BOOST_COROUTINES_DETAIL_STACK_TUPLE_H
Chris@16 8 #define BOOST_COROUTINES_DETAIL_STACK_TUPLE_H
Chris@16 9
Chris@16 10 #include <cstddef>
Chris@16 11
Chris@16 12 #include <boost/config.hpp>
Chris@16 13
Chris@16 14 #include <boost/coroutine/detail/config.hpp>
Chris@16 15 #include <boost/coroutine/stack_context.hpp>
Chris@16 16
Chris@16 17 #ifdef BOOST_HAS_ABI_HEADERS
Chris@16 18 # include BOOST_ABI_PREFIX
Chris@16 19 #endif
Chris@16 20
Chris@16 21 namespace boost {
Chris@16 22 namespace coroutines {
Chris@16 23 namespace detail {
Chris@16 24
Chris@16 25 template< typename StackAllocator >
Chris@16 26 struct stack_tuple
Chris@16 27 {
Chris@16 28 coroutines::stack_context stack_ctx;
Chris@16 29 StackAllocator stack_alloc;
Chris@16 30
Chris@16 31 stack_tuple( StackAllocator const& stack_alloc_, std::size_t size) :
Chris@16 32 stack_ctx(),
Chris@16 33 stack_alloc( stack_alloc_)
Chris@16 34 { stack_alloc.allocate( stack_ctx, size); }
Chris@16 35
Chris@16 36 ~stack_tuple()
Chris@16 37 { stack_alloc.deallocate( stack_ctx); }
Chris@16 38 };
Chris@16 39
Chris@16 40
Chris@16 41 }}}
Chris@16 42
Chris@16 43 #ifdef BOOST_HAS_ABI_HEADERS
Chris@16 44 # include BOOST_ABI_SUFFIX
Chris@16 45 #endif
Chris@16 46
Chris@16 47 #endif // BOOST_COROUTINES_DETAIL_STACK_TUPLE_H