--- Comment #2 from Kenji Hara <> 2012-06-18 23:16:52 PDT ---
(In reply to comment #1)
> Is it really bug?

Yes. The problem is that declaring alias this is incorrectly matches more than
two templates. If you remove 'alias wrap this' from Wrap type, the conversion
will succeed.

> What if you have
> struct Wrap
> {
>     string wrap;
>     int i;
>     double d;
>     string s;
>     alias wrap this;
> }
> Should Wrap("foo") create the same thing as Wrap("foo", int.init, double.init,
> string.init)? Or should it not work? Maybe it should work, but it seems a bit
> funny to me to create a Wrap from just a string considering that the alias
> doesn't define how to initialize the rest of the object.

I also it seems a bit funny, but it should work. supports constructing conversion based on _syntactic possibilities_
- like range interface: r.empty, r.front, and r.popFront().
I think such limitation provides no benefit.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to