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:
Oliver Kowalke
2016-02-06 12:37:30 +01:00
parent 671b94df94
commit fdf24a0607
10 changed files with 69 additions and 61 deletions

View File

@@ -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;
}