A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N3614
Date: 2013-03-15
unwinding_exception
by Herb Sutter
Excerpt:
This paper does not propose adding language support for D-style
scope
statements.Instead, it proposes a new function
std::unwinding_exception
that returnstrue
iff we are executing a destructor of a stack-based object that is being called to perform stack unwinding.This enables
ScopeGuard
and similar uses to automatically and reliably distinguish between success and failure in standard C++ without requiring the user to explicitly signal success or failure by calling aDismiss
function on the guard object.
Add a Comment
Comments are closed.