[Issue 525] can't use array variable in typetuple index

Don Clugston dac at nospam.com.au
Fri Nov 17 06:51:01 PST 2006


d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=525
> 
> 
> 
> 
> 
> ------- Comment #2 from lovesyao at hotmail.com  2006-11-16 17:40 -------
> I dont think so. I update example.
> 
> import std.typetuple;
> const char[] a="\x01";
> const char b=a[0];//ok
> const char[] c="test";
> static assert(c[a[0]]=='e');//ok
> alias TypeTuple!(ulong,uint,ushort,ubyte) tuple;
> static assert(is(tuple[1]==uint));//ok
> static assert(is(tuple[a[0]]==uint));//failed

Interesting.
Does it work with
static assert(is(tuple[b]==uint));
?



More information about the Digitalmars-d-bugs mailing list