:relfileprefix: ../../
[#C3A30AD539AB0053C76F61EB328D9F8E6AC3DF41]

= Function make_scope_success

pass:v,q[Creates a scope fail guard with a given action function object.]


== Synopsis

Declared in header `<https://github.com/Lastique/scope/blob/develop/include/boost/scope/scope_success.hpp#L262[boost/scope/scope_success.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
template<typename F>
xref:boost/scope/scope_success-0ec.adoc[scope_success]<decay<F>::type>
make_scope_success(
    F&& func,
    bool active = true) noexcept(std::is_nothrow_constructible<scope_success<typename std::decay<F>::type>, F, bool>::value);
----

== Description

pass:v,q[**Effects:** Constructs a scope guard as if by calling] pass:v,q[`scope_success]
pass:v,q[<]
pass:v,q[std::decay_t]
pass:v,q[<]
pass:v,q[F > >(std::forward]
pass:v,q[<]
pass:v,q[F >(func), active)`.]



== Return Value

* `xref:boost/scope/scope_success-0ec.adoc[scope_success]<decay<F>::type>` 


== Parameters

|===
| Name | Type 

| *func*
| `F&&`

| *active*
| `bool`

|===



