error when std.range.Cycle of static array is a member
Lutger Blijdestijn
lutger.blijdestijn at gmail.com
Sun Jul 24 03:06:47 PDT 2011
I'm trying to have a Cycle range of a static array as a struct member, but
getting a compilation error. Can anybody tell me if I'm doing something
wrong, or is this a bug?
import std.range;
struct Foo
{
ubyte[] buf;
Cycle!(typeof(buf)) cbuf1; // ok
ubyte[1024] staticBuf;
Cycle!(typeof(staticBuf)) cbuf2; // error
void test()
{
Cycle!(typeof(staticBuf)) cbuf3;
cbuf3 = cycle(staticBuf); // ok
}
}
/std/range.d(228): Error: template instance std.array.front!(ubyte[1024u])
incompatible arguments for template instantiation
More information about the Digitalmars-d-learn
mailing list