Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ explicit final_action(F&& ff) noexcept;
Construct an object with the action to invoke in the destructor.

```cpp
~final_action() noexcept;
~final_action() noexcept(std::is_nothrow_invocable_v<F>);
```

The destructor will call the action that was passed in the constructor.
Expand Down
2 changes: 1 addition & 1 deletion include/gsl/util
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public:
explicit final_action(const F& ff) noexcept : f{ff} { }
explicit final_action(F&& ff) noexcept : f{std::move(ff)} { }

~final_action() noexcept { if (invoke) f(); }
~final_action() noexcept(std::is_nothrow_invocable_v<F>) { if (invoke) f(); }

final_action(final_action&& other) noexcept
: f(std::move(other.f)), invoke(std::exchange(other.invoke, false))
Expand Down
Loading