template instance cannot use local 'f' as parameter to non-global template
Trass3r
un at known.com
Tue Jul 12 06:06:56 PDT 2011
Is this a bug? If not, how do you make it work?
void h() {}
class Bla
{
mixin wrap!h;
}
mixin template wrap(alias f)
{
void blub(alias g = f)()
{
}
}
void main()
{
Bla b = new Bla();
b.blub();
}
test.d(18): Error: template instance cannot use local 'f' as parameter to
non-global template blub(alias g = f)
test.d(18): Error: template instance forward reference of f
test.d(18): Error: template instance test.Bla.wrap!(h).blub!(f) error
instantiating
More information about the Digitalmars-d-learn
mailing list