Re: Anybody have any idea on how to do shared operator overloads?

2022-06-01 Thread Tejas via Digitalmars-d-learn
On Thursday, 2 June 2022 at 01:49:32 UTC, Ruby The Roobster wrote: On Thursday, 2 June 2022 at 01:29:39 UTC, Ruby The Roobster wrote: On Thursday, 2 June 2022 at 01:00:57 UTC, Ali Çehreli wrote: On 6/1/22 17:36, Ruby The Roobster wrote: > A stripped down version of some code I have: Not much e

Re: Anybody have any idea on how to do shared operator overloads?

2022-06-01 Thread Ruby The Roobster via Digitalmars-d-learn
On Thursday, 2 June 2022 at 01:29:39 UTC, Ruby The Roobster wrote: On Thursday, 2 June 2022 at 01:00:57 UTC, Ali Çehreli wrote: On 6/1/22 17:36, Ruby The Roobster wrote: > A stripped down version of some code I have: Not much experience here but I made two changes: 1) Added 'shared': >

Re: Anybody have any idea on how to do shared operator overloads?

2022-06-01 Thread Ruby The Roobster via Digitalmars-d-learn
On Thursday, 2 June 2022 at 01:00:57 UTC, Ali Çehreli wrote: On 6/1/22 17:36, Ruby The Roobster wrote: > A stripped down version of some code I have: Not much experience here but I made two changes: 1) Added 'shared': > this(Complex!real num = Complex!real(0,0)) shared > { >

Re: Anybody have any idea on how to do shared operator overloads?

2022-06-01 Thread Ali Çehreli via Digitalmars-d-learn
On 6/1/22 17:36, Ruby The Roobster wrote: > A stripped down version of some code I have: Not much experience here but I made two changes: 1) Added 'shared': > this(Complex!real num = Complex!real(0,0)) shared > { > this.num = num; > } > this(shar

Anybody have any idea on how to do shared operator overloads?

2022-06-01 Thread Ruby The Roobster via Digitalmars-d-learn
A stripped down version of some code I have: ```d public import std.complex; public interface Mtype { // ... } public class Number : Mtype { public: this(Complex!real num = Complex!real(0,0)) { this.num = num; } this(shared Complex!real num =