On Saturday, 21 July 2012 at 16:05:24 UTC, Jacob Carlborg wrote:
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){}
Equally when they are passed as normal parameters.