[Issue 2733] Unclear semantics of template value parameters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 1 03:13:07 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2733





------- Comment #2 from samukha at voliacable.com  2009-04-01 05:13 -------
I'm not that sure anymore. Actually, I wouldn't mind if they were passed by
alias. Then, I could write simply

template foo(string s)
{}

instead of

template foo(alias s) if (isString!(s))
{}

If I want to restrict template arguments to statically known values, I can use
a isCompileTime constraint

template foo(string s) if (isCompileTime!(s))
{
}


-- 



More information about the Digitalmars-d-bugs mailing list