On Monday, 17 September 2018 at 23:14:28 UTC, tide wrote:
From what I've read, the copy constructor can be used with different types:

struct B
{
}

struct A
{
    @implicit this(ref B b)
    {
    }
}


B foo();

A a;
a = foo(); // ok because of @implicit
a = A(foo()); // ok without @implicit

That's why it exists, otherwise I wouldn't want two types to be implicitly convertible unless i explicitly tell it to be implicit.

This DIP does not allow this, but apparently it is on the horizon[1],

it will be easier to extend the feature to copy construct from any type to any type
Is this a thing we are even considering?
Yes.

I don't agree with it.

[1]: https://github.com/dlang/DIPs/pull/129#discussion_r218006614

Reply via email to