Skip to content

Instantly share code, notes, and snippets.

@lcapaldo
Created March 7, 2012 12:10
Show Gist options
  • Select an option

  • Save lcapaldo/1992759 to your computer and use it in GitHub Desktop.

Select an option

Save lcapaldo/1992759 to your computer and use it in GitHub Desktop.
struct counter : resource { int c; } r;
r.with_do([&]()
{
r.c += 1;
r.with_do([&]() { r.c += 1; });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment