Skip to content

Commit

Permalink
Merge pull request #47 from Lunar-YZ/Lunar-YZ-patch-1
Browse files Browse the repository at this point in the history
Fixed the Stack unwinding doc error
  • Loading branch information
olk authored Jan 2, 2024
2 parents d7e1c1c + 9113c98 commit 5c2c914
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions doc/asymmetric.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -275,22 +275,22 @@ After unwinding, a __coro__ is complete.

struct X {
X(){
std::cout<<"X()"<<std::endl;
std::cout << "X()" << std::endl;
}

~X(){
std::cout<<"~X()"<<std::endl;
std::cout << "~X()" << std::endl;
}
};

{
typedef boost::coroutines2::coroutine<void>::push_type coro_t;
typedef boost::coroutines2::coroutine<void> coro_t;

coro_t::push_type sink(
[&](coro_t::pull_type& source){
X x;
for(int=0;;++i){
std::cout<<"fn(): "<<i<<std::endl;
for(int i = 0; ; ++i){
std::cout << "fn(): " << i << std::endl;
// transfer execution control back to main()
source();
}
Expand All @@ -312,7 +312,6 @@ After unwinding, a __coro__ is complete.
fn(): 2
fn(): 3
fn(): 4
fn(): 5
sink is complete: false
~X()

Expand Down

0 comments on commit 5c2c914

Please sign in to comment.