Destructor called twice.
TheFlyingFiddle
none at none.com
Mon Feb 26 21:18:23 UTC 2018
On Sunday, 25 February 2018 at 21:35:33 UTC, ketmar wrote:
> add postblit debug prints, and you will see.
I get that it will call the postblit since it creates a temporary.
What I expected though was that.
auto s = S(0).foo(1);
Would become something like:
S s; s.__ctor(0).foo(1);
But maybe this would not be consistent behavior?
I'm wondering why it creates the temporary in the first place.
More information about the Digitalmars-d-learn
mailing list