On 08/25/2014 11:10 AM, Gary Willoughby wrote:
Compiling the following code:
import std.typecons;
class Foo
{
private int foo;
mixin Proxy!(foo);
this(int x)
{
this.foo = x;
}
}
void main()
{
}
Produces this error:
:!rdmd --force -de -debug -w test.d
/usr/include/dmd/phobos/std/typecons.d(4043): Error: template instance
isArray!(typeof(a)) template 'isArray' is not defined
test.d(7): Error: mixin test.Foo.Proxy!(foo) error instantiating
Failed: ["dmd", "-de", "-debug", "-w", "-v", "-o-", "test.d", "-I."]
Can anyone else confirm or am i doing something wrong. I'm using DMD
2.066.0 64bit Ubuntu 14.04.
isArray is defined in std.traits. I don't know why it doesn't work even
though std.typecons does import it.
The workaround is to import it yourself in your program:
import std.traits;
Ali