14 template<std::invocable EF>
20 std::destructible<EF>
and
21 std::is_constructible_v<EF, Fn>
and
22 not std::same_as<std::remove_cvref_t<Fn>,
ScopeExit>
33 requires (std::is_nothrow_move_constructible_v<EF>) :
34 exit_function_{std::
move(
tmp.exit_function_)},
40 requires (not std::is_nothrow_move_constructible_v<EF>
and std::is_copy_constructible_v<EF>) :
41 exit_function_{
tmp.exit_function_},
42 is_active_{std::exchange(
tmp.is_active_,
false)}
63 bool is_active_ =
true;
Definition scope_exit.h:15
void release() noexcept
Definition scope_exit.h:59
ScopeExit(const ScopeExit &)=delete
ScopeExit(ScopeExit &&tmp) noexcept
Definition scope_exit.h:32
ScopeExit & operator=(const ScopeExit &)=delete
ScopeExit & operator=(ScopeExit &&) noexcept=delete
ScopeExit(ScopeExit &&tmp) noexcept(std::is_nothrow_copy_constructible_v< EF >)
Definition scope_exit.h:39
ScopeExit(Fn &&fn)
Constructs a ScopeExit from a function or function object.
Definition scope_exit.h:24
Definition custom_decoration_generator.h:5
constexpr U to(T &&value)
Definition conversion.h:56
and
Definition algorithms.h:158