mirror of
https://github.com/boostorg/coroutine2.git
synced 2025-05-09 23:24:01 +00:00
apply std::allocator_arg as required by boost.context
This commit is contained in:
parent
b5e475ff36
commit
4197d019f9
@ -8,6 +8,7 @@
|
||||
#define BOOST_COROUTINES2_DETAIL_PULL_CONTROL_BLOCK_IPP
|
||||
|
||||
#include <exception>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
@ -33,7 +34,7 @@ template< typename StackAllocator, typename Fn >
|
||||
pull_coroutine< T >::control_block::control_block( context::preallocated palloc, StackAllocator salloc,
|
||||
Fn && fn_, bool preserve_fpu_) :
|
||||
other( nullptr),
|
||||
ctx( palloc, salloc,
|
||||
ctx( std::allocator_arg, palloc, salloc,
|
||||
[=,fn=std::forward< Fn >( fn_),ctx=boost::context::execution_context::current()] () mutable -> void {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< T >::control_block synthesized_cb( this, ctx);
|
||||
@ -109,7 +110,7 @@ template< typename StackAllocator, typename Fn >
|
||||
pull_coroutine< T & >::control_block::control_block( context::preallocated palloc, StackAllocator salloc,
|
||||
Fn && fn_, bool preserve_fpu_) :
|
||||
other( nullptr),
|
||||
ctx( palloc, salloc,
|
||||
ctx( std::allocator_arg, palloc, salloc,
|
||||
[=,fn=std::forward< Fn >( fn_),ctx=boost::context::execution_context::current()] () mutable -> void {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< T & >::control_block synthesized_cb( this, ctx);
|
||||
@ -184,7 +185,7 @@ template< typename StackAllocator, typename Fn >
|
||||
pull_coroutine< void >::control_block::control_block( context::preallocated palloc, StackAllocator salloc,
|
||||
Fn && fn_, bool preserve_fpu_) :
|
||||
other( nullptr),
|
||||
ctx( palloc, salloc,
|
||||
ctx( std::allocator_arg, palloc, salloc,
|
||||
[=,fn=std::forward< Fn >( fn_),ctx=boost::context::execution_context::current()] () mutable -> void {
|
||||
// create synthesized push_coroutine< T >
|
||||
typename push_coroutine< void >::control_block synthesized_cb( this, ctx);
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
@ -34,7 +35,7 @@ template< typename StackAllocator, typename Fn >
|
||||
push_coroutine< T >::control_block::control_block( context::preallocated palloc, StackAllocator salloc,
|
||||
Fn && fn_, bool preserve_fpu_) :
|
||||
other( nullptr),
|
||||
ctx( palloc, salloc,
|
||||
ctx( std::allocator_arg, palloc, salloc,
|
||||
[=,fn=std::forward< Fn >( fn_),ctx=boost::context::execution_context::current()] () mutable -> void {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< T >::control_block synthesized_cb( this, ctx);
|
||||
@ -138,7 +139,7 @@ template< typename StackAllocator, typename Fn >
|
||||
push_coroutine< T & >::control_block::control_block( context::preallocated palloc, StackAllocator salloc,
|
||||
Fn && fn_, bool preserve_fpu_) :
|
||||
other( nullptr),
|
||||
ctx( palloc, salloc,
|
||||
ctx( std::allocator_arg, palloc, salloc,
|
||||
[=,fn=std::forward< Fn >( fn_),ctx=boost::context::execution_context::current()] () mutable -> void {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< T & >::control_block synthesized_cb( this, ctx);
|
||||
@ -218,7 +219,7 @@ push_coroutine< T & >::control_block::valid() const noexcept {
|
||||
template< typename StackAllocator, typename Fn >
|
||||
push_coroutine< void >::control_block::control_block( context::preallocated palloc, StackAllocator salloc, Fn && fn_, bool preserve_fpu_) :
|
||||
other( nullptr),
|
||||
ctx( palloc, salloc,
|
||||
ctx( std::allocator_arg, palloc, salloc,
|
||||
[=,fn=std::forward< Fn >( fn_),ctx=boost::context::execution_context::current()] () mutable -> void {
|
||||
// create synthesized pull_coroutine< T >
|
||||
typename pull_coroutine< void >::control_block synthesized_cb( this, ctx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user