2
0
mirror of https://github.com/boostorg/scope.git synced 2026-01-26 19:12:08 +00:00
Commit Graph

30 Commits

Author SHA1 Message Date
Andrey Semashev
f3ea39eeb7 Assert the expected uncaught_exceptions() result in exception_checker.
This may help detect unsupported uses of exception_checker with coroutines
and non-scoped scope guards.

Closes https://github.com/Lastique/scope/issues/2.
2023-04-24 00:38:47 +03:00
Andrey Semashev
a4a5a8443a Added docs for template parameters. 2023-04-09 01:03:23 +03:00
Andrey Semashev
0dd24702fa Fixed missing default args in Doxygen docs. 2023-04-09 00:57:35 +03:00
Andrey Semashev
c9434eaee8 Updated docs to discuss issues with checking for a thrown exception.
Based on the boost-dev ML discussion, added a note regarding exception_checker
limitation with coroutines. Also, rearranged docs and improved wording in
a few places to make exception_checker and condition functions in general
documentation more distinct. Added rationale for using conditional scope guards
as opposed to using scope_exit universally.
2023-04-09 00:30:36 +03:00
Andrey Semashev
c5635f21cc Implemented scope_check and added support for arbitrary fail conditions.
The new scope_check scope guard is a generalization of scope_success and
scope_fail and allows specifying arbitrary conditions for executing the
scope exit action. The scope_success and scope_fail have been
reimplemented in terms of scope_check and now also support arbitrary
fail conditions.

Added exception_checker and error_code_checker conditions for testing
for an exception being thrown and for an error code, respectively.
scope_success and scope_fail use exception_checker by default.

Added tests for the new components.
2023-03-26 21:02:11 +03:00
Andrey Semashev
5a8148562f Removed name imports into boost namespace. 2023-03-22 03:57:17 +03:00
Andrey Semashev
bb538c366c Working on unique_resource docs. 2023-03-22 03:23:56 +03:00
Andrey Semashev
0e83fcbde7 Added support for file descriptors on Windows. 2023-03-20 00:21:06 +03:00
Andrey Semashev
04fec628ef Updating docs for unique_resource. 2023-03-12 20:56:55 +03:00
Andrey Semashev
b0b11e3d55 Converted HTML markup to Markdown in Doxygen comments. 2023-03-11 15:05:01 +03:00
Andrey Semashev
4f551c185c Fixed a typo in a comment. 2023-03-07 00:57:47 +03:00
Andrey Semashev
2da0db4f58 Reuse is_swappable from Boost.TypeTraits. 2023-03-06 04:43:38 +03:00
Andrey Semashev
39dc0b1cd7 Added Doxygen documentation. 2023-03-06 04:42:15 +03:00
Andrey Semashev
f3cfd937f6 Updated license headers. 2023-02-24 19:30:55 +03:00
Andrey Semashev
18b135804a Added support for default_resource keyword. 2023-02-22 01:38:35 +03:00
Andrey Semashev
678253f727 Added more tests for exception handling, fixed bugs. 2023-02-21 02:27:42 +03:00
Andrey Semashev
288d1bfb83 Added header/footer.hpp to disable common warnings. 2023-02-20 02:28:04 +03:00
Andrey Semashev
1e9787d4e8 Avoid using try/catch in non-throwing ctors to silence MSVC warnings. 2023-02-19 20:31:13 +03:00
Andrey Semashev
dbfe34ae36 Workaround MSVC-14.0 lack of support for SFINAE expressions. 2023-02-18 15:54:30 +03:00
Andrey Semashev
f7bb6e2fb1 Workaround for clang < 5.0 that can't pass class template as a TTP from within the class definition. 2023-02-18 14:33:21 +03:00
Andrey Semashev
accb6984a7 Attempt to work around gcc 5-8 ICE. 2023-02-18 14:16:45 +03:00
Andrey Semashev
45b1e47b44 Expanded noexcept specification for make_unique_resource_checked.
This avoids applying std::is_nothrow_constructible to unique_resource,
which at that point is incomplete. Presumably, this causes ICE in
gcc-5 through 8 and compile errors with MSVC.
2023-02-13 03:04:23 +03:00
Andrey Semashev
00df65b1bd Revert "Explicitly specify template parameters in is_not_like specializations."
This reverts commit 7c5aef0bb5.
2023-02-13 02:21:05 +03:00
Andrey Semashev
7c5aef0bb5 Explicitly specify template parameters in is_not_like specializations. 2023-02-13 02:08:23 +03:00
Andrey Semashev
894e32bb66 Removed redefinition of template param default. 2023-02-13 01:59:31 +03:00
Andrey Semashev
8bc955abe5 Removed explicit qualification of func_base. 2023-02-13 01:58:12 +03:00
Andrey Semashev
9b798f52d7 Only enable implicit default construction of the deleter if it doesn't throw.
This is to prevent leaking the resource if default construction of the deleter
throws.
2023-02-13 00:55:36 +03:00
Andrey Semashev
928160b613 Added unique_posix_fd. Fixed unique_resource traits support. Added tests. 2023-02-12 20:13:53 +03:00
Andrey Semashev
166d6a178b Fixes and tests for unique_resource. 2023-01-24 02:22:16 +03:00
Andrey Semashev
9f55473af2 Initial commit. 2023-01-10 02:18:35 +03:00