Creates a scope fail guard with a given action function object.

Synopsis

Declared in header <boost/scope/scope_fail.hpp>

template<typename F>
scope_fail<decay<F>::type>
make_scope_fail(
    F&& func,
    bool active = true) noexcept(std::is_nothrow_constructible<scope_fail<typename std::decay<F>::type>, F, bool>::value);

Description

Effects: Constructs a scope guard as if by calling `scope_fail < std::decay_t < F > >(std::forward < F >(func), active)`.

Return Value

Parameters

Name Type

func

F&&

active

bool