Summary: Compile time conversions of double/floats to strings
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Bassieg <> 2012-07-24 03:22:23 PDT ---
When converting a float to a string from within a mixin an error is given. 


import std.conv;
enum doubleString = mixin("to!string(0.6)");

Gives the following error:

..src\phobos\std\format.d(1355): Error: _snprintf cannot be interpreted at
compile time, because it has no available source code

The reason for the error is clear: _snprintf is an external function and can
therefore not be interpreted.

However, I think that compile-time conversion of floats to strings should be
supported. Perhaps the formatting code can be ported to the std library instead
of using an external function?

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to