- This macro ensures that the global @a function with 0, 1, 2 or more
- parameters (up to some implementation-defined limit) is executed on scope
- exit, whether due to a normal function return or because an exception has
- been thrown. A typical example of its usage:
+ Returns a scope guard object which will call the specified function with
+ the given parameters on scope exit.
+
+ This function is overloaded to take several parameters up to some
+ implementation-defined (but relatively low) limit.
+
+ The @a func should be a functor taking parameters of the types P1, ..., PN,
+ i.e. the expression @c func(p1, ..., pN) should be valid.
+ */
+template <typename F, typename P1, ..., typename PN>
+wxScopeGuard wxMakeGuard(F func, P1 p1, ..., PN pN);
+
+//@}
+
+/** @addtogroup group_funcmacro_misc */
+//@{
+/**
+ Ensure that the global @a function with a few (up to some
+ implementation-defined limit) is executed on scope exit, whether due to a
+ normal function return or because an exception has been thrown.
+
+ A typical example of its usage: