I'd like to create a return_if(cond, val)
without resorting to macros, for using in non-static member functions. It should be equivalent to
{ //do some stuff on non-static data members here if (cond) return val; //and don't return otherwise}
I don't mind using GCC extensions. It will appear frequently in the code, so I'd like a terse thing.