Purity of std.conv.to!string

Jack Stouffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 26 22:52:24 PDT 2015


On Saturday, 26 September 2015 at 17:08:00 UTC, Nordlöw wrote:
> Why is the following code not pure:
>
>     float x = 3.14;
>     import std.conv : to;
>     auto y = x.to!string;
>
>
> ???
>
> Is there a reason for it not being pure? If not, this is a 
> serious problem as this is such a fundamental function.

Please make an issue on https://issues.dlang.org and I'll take a 
look a this later. Most of the functions in std.conv are 
templated so it must be some internal function that's not 
properly annotated, or it's using manual memory management.


More information about the Digitalmars-d-learn mailing list