@@ -201,28 +201,33 @@ class [[nodiscard]] scope_guard;
201201
202202// ==================================================================================================
203203
204- // --- General definition ---
205-
204+ /* * Generalized scope guard template
205+ * This template provides the general behaviors required for more concrete instances of scope types.
206+ * @tparam ScopeExitFunction callable function that is conditionally invoked at the end of the scope.
207+ * @tparam InvokeChecker callable function that handles checking if callback should be called on scope exit.
208+ * @tparam ConstructionExceptionBehavior callable function that defines the behavior if an exception occurs
209+ * on the construction.
210+ */
206211template <scope_exit_function ScopeExitFunc,
207212 scope_function_invoke_check InvokeChecker,
208213 exception_during_construction_behaviour ConstructionExceptionBehavior>
209214class [[nodiscard]] scope_guard<ScopeExitFunc, InvokeChecker, ConstructionExceptionBehavior> {
210215 public:
211- // The constructor parameter `exit_func` in the following constructors shall be :
212- // - a reference to a function
213- // - or a reference to a function object([function.objects])
214- //
215-
216- // If EFP is not an lvalue reference type and is_nothrow_constructible_v<EF,EFP> is true,
217- // initialize exit_function with std::forward<EFP>(f);
218- // otherwise initialize exit_function with f.
219-
220- // scope_fail / scope_exit
221- // If the initialization of exit_function throws an exception, calls f().
222-
223- // scope_success
224- // [Note: If initialization of exit_function fails, f() won’t be called. — end note]
225-
216+ /* * The constructor parameter `exit_func` in the following constructors shall be :
217+ * - a reference to a function
218+ * - or a reference to a function object([function.objects])
219+ *
220+ *
221+ * If EFP is not an lvalue reference type and is_nothrow_constructible_v<EF,EFP> is true,
222+ * initialize exit_function with std::forward<EFP>(f);
223+ * otherwise initialize exit_function with f.
224+ *
225+ * scope_fail / scope_exit
226+ * If the initialization of exit_function throws an exception, calls f().
227+ *
228+ * scope_success
229+ * [Note: If initialization of exit_function fails, f() wont be called. end note]
230+ */
226231 template <typename EF, typename CHKR>
227232 constexpr scope_guard (EF&& exit_func,
228233 CHKR&& invoke_checker) noexcept (std::is_nothrow_constructible_v<ScopeExitFunc> &&
0 commit comments