http://d.puremagic.com/issues/show_bug.cgi?id=995
------- Comment #1 from Daniel919 web.de 2007-02-22 11:39 -------
Is this related to the bug ?
--------------------------------------------------------------------
import std.stdio;
template eval(A...) { alias A eval; }
char[] retsth(int i) {
const char[] foo[2] = ["a","b"];
return foo[i];
}
//Error: cannot evaluate retsth(0) at compile time
//Error: expression eval!(retsth(0)) is void and has no value
void main()
{
writefln(eval!(retsth(0)));
}
--------------------------------------------------------------------
PS: Ultimately I would like to be able to do:
writefln(eval!(std.string.stripl(" test"));
Maybe some more string operations could be compile-time ready ?
I am not sure whether this will work if this bug get's fixed,
so maybe this is a feature req ;)
--

http://d.puremagic.com/issues/show_bug.cgi?id=995
------- Comment #3 from bugzilla digitalmars.com 2007-03-09 03:48 -------
The first example is not a bug; tuples must be evaluatable at compile time, and
i of retsth(i) is not known at compile time when object code is generated for
it. The other two are bugs.
--