Re: struct Foo may not define both a rvalue constructor and a copy constructor

2019-10-16 Thread drug via Digitalmars-d-learn
On 10/16/19 6:40 PM, rikki cattermole wrote: On 17/10/2019 4:29 AM, drug wrote: struct Foo { this(ref const(Foo) other) {} this(const(Foo) other) {} } I'm trying to update dmd version and starting from 2.086 my code doesn't compile due to the error above. What is the reason of that?

Re: struct Foo may not define both a rvalue constructor and a copy constructor

2019-10-16 Thread rikki cattermole via Digitalmars-d-learn
On 17/10/2019 4:29 AM, drug wrote: struct Foo {     this(ref const(Foo) other) {}     this(const(Foo) other) {} } I'm trying to update dmd version and starting from 2.086 my code doesn't compile due to the error above. What is the reason of that? Copy constructors were added (sort of like

struct Foo may not define both a rvalue constructor and a copy constructor

2019-10-16 Thread drug via Digitalmars-d-learn
struct Foo { this(ref const(Foo) other) {} this(const(Foo) other) {} } I'm trying to update dmd version and starting from 2.086 my code doesn't compile due to the error above. What is the reason of that? Is it temporarily situation?