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
{
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
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
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
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
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.dlang.io/is/kosYuC
I had to put in a s
On 7/10/18 10:34 AM, Timoses wrote:
How do I create an inout object with template parameters?
Take following code:
import std.stdio;
import std.traits;
struct S
{
int[] arr;
}
interface I
{
inout(I) opIndex(size_t idx) inout;
}
c
How do I create an inout object with template parameters?
Take following code:
import std.stdio;
import std.traits;
struct S
{
int[] arr;
}
interface I
{
inout(I) opIndex(size_t idx) inout;
}