Alias this and std.traits.isArray
David
d at dav1d.de
Sat Jan 5 06:43:48 PST 2013
This code worked with dmd 2.060:
import std.stdio;
import std.traits;
struct OhWhy(S) {
S[] arr;
alias arr this;
}
void main() {
static assert(isArray!(OhWhy!(float)));
}
But fails with dmd 2.061:
ss.d(10): Error: static assert (isArray!(OhWhy!(float))) is false
(same happens with alias this to static arrays and isArray/isStaticArray)
Is this intended or a regression? If latter, I'll submit a bug-ticket.
More information about the Digitalmars-d
mailing list