Re: insertInPlace differences between compilers

2014-11-12 Thread John McFarlane via Digitalmars-d-learn
On Wednesday, 12 November 2014 at 00:31:31 UTC, Jesse Phillips wrote: On Tuesday, 11 November 2014 at 20:53:51 UTC, John McFarlane wrote: I'm trying to write a struct template that uses `insertInPlace`. However, it doesn't work with certain template type / compiler combinations. Consider the

Re: insertInPlace differences between compilers

2014-11-12 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 12 November 2014 at 19:25:49 UTC, John McFarlane wrote: That makes sense. In the case that `c` is a class, do you think I'd have any luck if I made it immutable? The quick answer is that it doesn't help. DMD still doesn't like me using insertInPlace. This is a little disappointing

insertInPlace differences between compilers

2014-11-11 Thread John McFarlane via Digitalmars-d-learn
I'm trying to write a struct template that uses `insertInPlace`. However, it doesn't work with certain template type / compiler combinations. Consider the following: import std.range; struct S { const int c; } S[] a; insertInPlace(a, 0, S()); With DMD64 D Compiler v2.066.1, I

Re: insertInPlace differences between compilers

2014-11-11 Thread Jesse Phillips via Digitalmars-d-learn
On Tuesday, 11 November 2014 at 20:53:51 UTC, John McFarlane wrote: I'm trying to write a struct template that uses `insertInPlace`. However, it doesn't work with certain template type / compiler combinations. Consider the following: import std.range; struct S { const int c; } S[]