mixin not overloading other mixins, Bug or feature?
Travis Boucher
boucher.travis at gmail.com
Mon Dec 21 22:31:17 PST 2009
float func1(float[2] v) { return v[0]; }
float func1(float[3] v) { return v[0]; }
template Test (size_t S) {
float func2(float[S] v) { return v[0]; }
}
mixin Test!(2);
mixin Test!(3);
void main() {
float[2] a2;
func1(a2);
func2(a2);
}
Here the call to func1 is fine, but the call to func2 results in a conflict.
Test!(2).func2 conflicts with unit.Test!(3).func2
This was tested with ldc (dmd 1.051).
Is this a bug or a "feature"?
More information about the Digitalmars-d
mailing list