On Fri, 17 Jun 2011 18:52:05 -0400, Timon Gehr wrote:
Steven Schveighoffer wrote:
https://github.com/D-Programming-Language/druntime/pull/29
See if that helps. On my system, your code now results in your expected
output.
-Steve
If the compiler optimizes well enough the output given could
Steven Schveighoffer wrote:
> https://github.com/D-Programming-Language/druntime/pull/29
>
> See if that helps. On my system, your code now results in your expected
> output.
>
> -Steve
If the compiler optimizes well enough the output given could be valid (it might
construct the struct directly w
On Fri, 17 Jun 2011 06:42:51 -0400, Steven Schveighoffer
wrote:
On Fri, 17 Jun 2011 00:05:56 -0400, Jose Armando Garcia
wrote:
It looks like the rt is not calling the postblit constructor when
concatenating arrays. For example, the following code:
import std.stdio;
struct Test
{
thi
On Fri, 17 Jun 2011 00:05:56 -0400, Jose Armando Garcia
wrote:
It looks like the rt is not calling the postblit constructor when
concatenating arrays. For example, the following code:
import std.stdio;
struct Test
{
this(this) { writeln("copy done"); }
void opAssign(Test rhs) { writel
On Fri, Jun 17, 2011 at 1:05 AM, Jose Armando Garcia wrote:
> tests ~= test;
Btw, if you replace this with 'test[0] = test;' it works as expected.
The postblit ctor and the assignment operator get called and the dtor
is called twice.
It looks like the rt is not calling the postblit constructor when
concatenating arrays. For example, the following code:
import std.stdio;
struct Test
{
this(this) { writeln("copy done"); }
void opAssign(Test rhs) { writeln("assignment done"); }
~this() { writeln("destructor called"); }