...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The library has been accepted into Boost. Updates according to Boost review comments and conditions:
scope_final
to
defer_guard
and BOOST_SCOPE_FINAL
to BOOST_SCOPE_DEFER
.
Thanks to Peter Dimov for the suggestion
during the review. The name "defer" is being used in other programming
languages (Go, Swift and even proposed
for inclusion in C) for the functionality similar to scope_final
.
release
member
from the scope guard types. This method was equivalent to set_active(false)
and
existed for compatibility with the C++ Extensions for Library Fundamentals
TS. Boost review conclusion indicated that conformance with the TS is not
a worthy goal.
unique_resource
, added
explicit operator
bool
as a way to test if the resource
in an allocated state, similar to the allocated
method. This was suggested by Dmitry Arkhipov before the review. Note that
the operator does not test the resource value, which is similar to std::optional
.
unallocated_resource
class template
for simplifying declaration of resource traits for unique_resource
.
The idea of a more compact unique_resource
declaration was presented by Janko Dedic in his review.
unique_resource
move constructor was modified to preserve the original state of the source
argument in case of exception. This deviates from the TS behavior, which
specifies to invoke the deleter on the move-constructed resource, but it
means the move constructor now maintains strong exception guarantee.
unique_resource
resource traits
specified by user. Improved description of requirements for the resource
traits.
Initial release for Boost review.