inout question

Kagamin spam at here.lot
Mon Feb 12 11:20:16 UTC 2018


On Monday, 12 February 2018 at 05:33:16 UTC, Norm wrote:
> I thought inout was supposed to take const or non-const 
> variants, so expected the original const char* s to work.

The problem is in argument e: it's mutable, and strtod stores 
there a part of s, if s is const you end up with const data 
available for writing through e. Should be const(char)** e.


More information about the Digitalmars-d-learn mailing list