Behavior of std.conv : to with alias this

João Lourenço jlourenco5691 at gmail.com
Fri May 21 17:34:44 UTC 2021


On Thursday, 20 May 2021 at 18:27:02 UTC, Paul Backus wrote:
> On Thursday, 20 May 2021 at 16:19:02 UTC, João Lourenço wrote:
>>
>> Is this the intended behavior of `std.conv : to`?
>> Shouldn't it only fallback to the `alias this` if **none** of 
>> those work?
>
> The [documentation][1] of `std.conv.to` doesn't mention 
> anything about implicit conversions or `alias this`, so at the 
> very least, this is a bug in the documentation.
>
> [1]: http://phobos.dpldocs.info/std.conv.to.html

Or it is just an unintended side effect. The current behavior 
makes these functions useless.


More information about the Digitalmars-d mailing list