Is there a way to create a template that would do the same is glib

g_return_val_if_fail() (https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-val-if-fail)

I was hoping something like this would work

template returnValIfFail(alias expr, alias val)
{
    if(expr) return val;
}

Reply via email to