[Issue 2499] Template alias default value cannot be template instantiation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 8 13:47:46 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2499
------- Comment #1 from schveiguy at yahoo.com 2008-12-08 15:47 -------
Note that in the case where you want the default value to depend on other
template parameters, such as:
struct f(T, alias func=foo!(T))
This is much tricker. I found that the cleanest way to workaround is to avoid
default parameters, and just alias the less specific ones:
struct f(T, alias func)
{
}
template f(T)
{
alias f!(T, foo!(T)) f;
}
--
More information about the Digitalmars-d-bugs
mailing list