February 04, 2004 Alias bug (member templates) | ||||
---|---|---|---|---|
| ||||
With the following code the alias doesn't work but it should! class set(SetType) { template transform(FUNC) { static FUNC transform(FUNC f, inout set a) { //... } } } alias set!(int) IntegerSet; int square(in int x) { return x*x; } in main: IntegerSet set1 = new IntegerSet(); //this works: set!(int).transform!(typeof(&square))(&square,set1); //this doesnt work: IntegerSet.transform!(typeof(&square))(&square,set1); |
Copyright © 1999-2021 by the D Language Foundation