Synopsis

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

template<
    typename F,
    typename = enable_if<detail::conjunction<std::is_nothrow_default_constructible<Cond>, std::is_constructible<data, typename detail::move_or_copy_construct_ref<F, Func>::type, typename detail::move_or_copy_construct_ref<Cond>::type, bool>, detail::is_not_like_scope_exit<F>>::value>::type>
scope_exit(
    F&& func,
    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<Cond>::type, bool>::value);