Problem: handling a function dependent on release mode.

Jacob Carlborg doob at me.com
Sat Jul 21 09:05:23 PDT 2012


On 2012-07-20 23:47, Namespace wrote:

> Maybe something like that?
>
> void alCheck(lazy void Func, string filename = __FILE__, uint
> line = __LINE__) {
>      Func();
>
>      debug {
>          alCheckError(filename, line);
>      }
> }

If "filename" and "line" is template parameters they will get the 
default values from the call site.

void alCheck (string filename = __FILE__, uint line = __LINE__) (lazy 
void Func)
{}

-- 
/Jacob Carlborg




More information about the Digitalmars-d-learn mailing list