pure format

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 2 02:56:10 PDT 2015


On 02-Jul-2015 12:53, Nicholas Wilson wrote:
> On Thursday, 2 July 2015 at 04:41:51 UTC, HaraldZealot wrote:
>> On Thursday, 4 June 2015 at 17:02:46 UTC, Oleg B wrote:
>>> On Thursday, 4 June 2015 at 16:21:54 UTC, Jonathan M Davis wrote:
>>>
>>> I think toString for float must be pure, but in practice it's not.
>>>
>>>
>>> It's a bug? I read what std.format.format using libc sprintf
>>> http://www.digitalmars.com/d/archives/digitalmars/D/learn/std.conv.to_purity_68957.html
>>> and if it try it's not a bug...
>>
>> And I also remember that format doesn't work in CT, so it was really
>> uncomfortable that a can't initialize array of special values for
>> algorithm in CT. It was a more than year ago, possible something changes.
>
> pretty sure std.metastring(s?) was deprecated 'cos format works at CT

Yeah, formattedWrite definitely works  at CTFE these days.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list