Skip to content

Instantly share code, notes, and snippets.

@rmartinho
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmartinho/12b125cfdd0eb5a35b5f to your computer and use it in GitHub Desktop.
Save rmartinho/12b125cfdd0eb5a35b5f to your computer and use it in GitHub Desktop.
struct base {
void close() { f(); do_close(); }
virtual do_close() = 0;
virtual ~base() { close(); }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment