Synopsis

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

template<
    typename F,
    typename C,
    typename = enable_if<detail::conjunction<detail::is_invocable<const C &>, std::is_constructible<data, typename detail::move_or_copy_construct_ref<F, Func>::type, typename detail::move_or_copy_construct_ref<C, Cond>::type, bool>>::value>::type>
scope_exit(
    F&& func,
    C&& cond,
    bool active = true) noexcept(std::is_nothrow_constructible<data, typename detail::move_or_copy_construct_ref<F, Func>::type, typename detail::move_or_copy_construct_ref<C, Cond>::type, bool>::value);