[Issue 2066] toString(int) nto CTFE-compatible

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 4 14:32:14 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2066





------- Comment #2 from simen.kjaras at gmail.com  2008-05-04 16:32 -------
(In reply to comment #1)
> Reply to d-bugmail at puremagic.com,
> in "static code" you can use "42.stringof" but, IIRC, that won't work in 
> other CTFE functions.

Example:

template foo(int line = __LINE__)
{
  pragma(msg, line.stringof); // prints 'line'.
  pragma(msg, toString(line)); // should print a number of some kind. Currently
does not.
}

That is pretty much why I need this.


-- 



More information about the Digitalmars-d-bugs mailing list