I need a macro/templated function that will wrap function call of some method on specific object, i.e
a.Destroy()
where a can be of any type as well as Destroy and Destroy may or may not take 0 to n parameters. Inside this wrapper I need to do some checks.
I would like to be able to call this function as a wrapper:
DESTROY_CHECK(a.Destroy(p1,p2,...))
or
DESTROY_CHECK(a, Destroy(p1,p2,...))
How can I achieve this?