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: N3830
Date: 2013-12-23
Scoped Resource -- Generic RAII Wrapper for the Standard Library
by Peter Sommerlad and Andrew L. Sandoval
Excerpt:
Changes from N367: Replace all 4 proposed classes with a single class covering all use cases, using variadic templates, as determined in the Fall 2013 LEWG meeting.
The Standard Template Library provides RAII classes for managing pointer types, such as
std::unique_ptr
andstd::shared_ptr
. This proposal seeks to add a new generic RAII class which ties zero or more resources to a clean-up/completion routine which is bound by scope, ensuring execution at scope exit (as the object is destroyed) unless released or executed early or returned by moving its value.
Add a Comment
Comments are closed.