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

BCS ao at pathlink.com
Sun May 4 14:18:44 PDT 2008


Reply to d-bugmail at puremagic.com,

> http://d.puremagic.com/issues/show_bug.cgi?id=2066
> 
> Summary: toString(int) nto CTFE-compatible
> Product: D
> Version: 2.014
> Platform: PC
> OS/Version: Windows
> Status: NEW
> Severity: major
> Priority: P2
> Component: Phobos
> AssignedTo: bugzilla at digitalmars.com
> ReportedBy: simen.kjaras at gmail.com
> import std.string;
> 
> pragma(msg, toString(42));
> 
> The above program fails to compile, with the error message "cannot
> evaluate toString(42) at compile time"
> 

in "static code" you can use "42.stringof" but, IIRC, that won't work in 
other CTFE functions.




More information about the Digitalmars-d-bugs mailing list