return val if

Abby loniro7678 at
Sun Mar 22 18:48:32 UTC 2020

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


I was hoping something like this would work

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

More information about the Digitalmars-d-learn mailing list