Support implicit conversion between types

ilya-stromberg ilya-stromberg-2009 at yandex.ru
Wed Sep 4 13:25:27 PDT 2013


On Wednesday, 4 September 2013 at 20:14:06 UTC, Kozzi wrote:
> So you can use templates, something like this:

I know, it will work. But I really have **a lot of** different 
"bar" functions, so that way will be painful.

So, the question is: what should I add to "Foo" struct to allow 
implicit conversions from "int" to "Foo"?


More information about the Digitalmars-d-learn mailing list