Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
ricab committed Mar 24, 2018
1 parent 8095ad4 commit 32aac4f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,11 @@ struct throwing

try
{
throwing tmp;
make_scope_guard([&tmp](){ t(); })
} catch(...) { /* handle somehow */ }
throwing_dtor tmp;
make_scope_guard([&tmp](){ tmp(); })
// tmp still alive
} // tmp only destroyed here
catch(...) { /* handle somehow */ }
```
#### const-invocable if const reference
Expand Down

0 comments on commit 32aac4f

Please sign in to comment.