mirror of
https://github.com/boostorg/coroutine2.git
synced 2026-02-03 09:02:15 +00:00
rename of caputed_context to execution_context (v2)
- execution_context (v2) is enabled per default - execution_context (v1) is enabled for property segmented-stacks=on
This commit is contained in:
@@ -9,12 +9,18 @@
|
||||
|
||||
#include <boost/coroutine2/all.hpp>
|
||||
|
||||
using namespace boost::coroutines2;
|
||||
|
||||
asymmetric_coroutine<int>::pull_type make_dummy_range()
|
||||
{
|
||||
return asymmetric_coroutine<int>::pull_type([](asymmetric_coroutine<int>::push_type& yield)
|
||||
{
|
||||
yield(1);
|
||||
});
|
||||
}
|
||||
|
||||
int main() {
|
||||
boost::coroutines2::coroutine< void >::push_type sink(
|
||||
[]( boost::coroutines2::coroutine< void >::pull_type & source) {
|
||||
std::cout << "inside coroutine-fn" << std::endl;
|
||||
});
|
||||
sink();
|
||||
std::distance(make_dummy_range()); // error
|
||||
std::cout << "Done" << std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user