Ticket #12221: coro2_unwind_bug.cpp
File coro2_unwind_bug.cpp, 433 bytes (added by , 6 years ago) |
---|
Line | |
---|---|
1 | // #include <boost/coroutine/all.hpp> |
2 | #include <boost/coroutine2/all.hpp> |
3 | #include <iostream> |
4 | |
5 | int main() |
6 | { |
7 | // using coro_t = boost::coroutines::coroutine<void>; // fine |
8 | using coro_t = boost::coroutines2::coroutine<void>; // bug |
9 | |
10 | coro_t::push_type sink( |
11 | [](coro_t::pull_type& source) { |
12 | // Shouldn't reach here without a call to sink()! |
13 | std::cout << "coroutine entered\n"; |
14 | }); |
15 | } |