On 6/17/22 10:04, Salih Dincer wrote:

> Isn't foo and bar the same thing?  I don't understand what's the
> difference!

>    auto foo = to!Foo("123"); //??

>    auto bar = Foo("321");

Yes, they are the same thing.

The OP was looking for a generic way of converting any type to any other type as long as there is a way. (Think a function template.) std.conv.to can do that because it considers the constructors as well.

Ali

Reply via email to