Re: Troubles creating templated inout objects

2018-07-12 Thread Timoses via Digitalmars-d-learn
On Wednesday, 11 July 2018 at 12:55:35 UTC, Timoses wrote: On Tuesday, 10 July 2018 at 18:01:59 UTC, Steven Schveighoffer wrote: You are overthinking :) inout typically is much easier than you expect, until you need to create temporary structs or types with inout members, then it becomes proble

Re: Troubles creating templated inout objects

2018-07-12 Thread Timoses via Digitalmars-d-learn
On Tuesday, 10 July 2018 at 14:34:55 UTC, Timoses wrote: `Unqual` in this case just turns `inout(int[])` into `inout(int)[]`, which is why it complains. That's a side effect of this example [...] See also: https://issues.dlang.org/show_bug.cgi?id=3567

Re: Troubles creating templated inout objects

2018-07-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/11/18 8:55 AM, Timoses wrote: On Tuesday, 10 July 2018 at 18:01:59 UTC, Steven Schveighoffer wrote: You are overthinking :) inout typically is much easier than you expect, until you need to create temporary structs or types with inout members, then it becomes problematic. https://run.dla

Re: Troubles creating templated inout objects

2018-07-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/12/18 4:58 AM, Timoses wrote: On Tuesday, 10 July 2018 at 14:34:55 UTC, Timoses wrote: `Unqual` in this case just turns `inout(int[])` into `inout(int)[]`, which is why it complains. That's a side effect of this example [...] See also: https://issues.dlang.org/show_bug.cgi?id=3567 Resp

Re: Troubles creating templated inout objects

2018-07-12 Thread Timoses via Digitalmars-d-learn
On Thursday, 12 July 2018 at 12:22:34 UTC, Steven Schveighoffer wrote: On 7/11/18 8:55 AM, Timoses wrote: class TestA(T : T[]) {     Test!T[] arr;     // ERROR: Can't initialize inout variable in a for loop...     this(inout(T[]) arr) inout     {    

Re: Is it feasible to slowly rewrite a C++ codebase in D?

2018-07-12 Thread Seb via Digitalmars-d-learn
On Wednesday, 11 July 2018 at 20:38:13 UTC, Dukc wrote: On Wednesday, 11 July 2018 at 19:41:37 UTC, Jordi Gutiérrez Hermoso wrote: Just getting it into -betterC territory seems like a very daunting task. You do not need -betterC anymore. At least the LDC frontend will only add linking hooks f

Orange not working?

2018-07-12 Thread JN via Digitalmars-d-learn
I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jacob-carlborg/orange , but I am getting a long list of errors: ..\..\AppData\Local\dub\packages\orange-1.0.0\o

Re: Orange not working?

2018-07-12 Thread Timoses via Digitalmars-d-learn
On Thursday, 12 July 2018 at 20:44:43 UTC, JN wrote: I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jacob-carlborg/orange , but I am getting a long list of err

Re: Orange not working?

2018-07-12 Thread JN via Digitalmars-d-learn
On Friday, 13 July 2018 at 05:29:58 UTC, Timoses wrote: On Thursday, 12 July 2018 at 20:44:43 UTC, JN wrote: I am trying to make use of the Orange package, I added the latest version from dub to my project: "orange": "~>1.0.0" and copy pasted the "simple usage" code from https://github.com/jac