BCS schrieb:
Hello Sergey,

but this doesn't:

template Tuple(T...)
{
alias T Tuple;
}
void foo()
{
foreach (a; Tuple!("a", "b", "c"))
pragma(msg, a);
}
$ dmd -c test.d
test.d(8): Error: string expected for message, not 'a'
test.d(8): Error: string expected for message, not 'a'
test.d(8): Error: string expected for message, not 'a'
*This* seems like a bug to me.


try indexing it:

template Tuple(T...)
{
alias T Tuple;
}
void foo()
{
alias Tuple!("a", "b", "c") Tpl;
foreach (i,a; Tpl)
 pragma(msg, Tpl[i]);
}

(BTW that is a known bug)


Do you know the bug number?

Reply via email to