__traits(getMember) and uniform call syntax
Tomek Sowiński
just at ask.me
Sat Oct 16 17:03:51 PDT 2010
What's the status quo on member functions defined outside the type?
import std.array;
void main() {
int[] arr = [1,2];
// compiles, should it?
int a = __traits(getMember, arr, "front");
// compiles (called popFront), should it?
__traits(getMember, arr, "popFront");
// doesn't compile
// __traits(getMember, arr, "popFront")();
}
I'd appreciate if someone told apart bugs from features.
--
Tomek
More information about the Digitalmars-d
mailing list