toChars Bug?

ketmar ketmar at ketmar.no-ip.org
Tue Dec 12 15:18:01 UTC 2017


John Colvin wrote:

> On Tuesday, 12 December 2017 at 12:49:32 UTC, ketmar wrote:
>> see documentation: 
>> http://dpldocs.info/experimental-docs/std.conv.toChars.html
>>
>> "...Can be uint or ulong. If radix is 10, can also be int or long."
>>
>> 45 is int, not uint. so no radices except `10` will work.
>
> I think it would be possible to alter toChars such that it had a set of 
> overloads, such that value range propagation would allow an implicit 
> conversion here.

yeah, i think that overloads with explicit `uint` and `ulong` args should 
take care of that.


More information about the Digitalmars-d mailing list