[Issue 18029] extra dtor call with typed variadic argument (or missing postblit)

2024-12-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18029

--- Comment #2 from dlangBugzillaToGithub  ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17822

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO
GITHUB

--


[Issue 18029] extra dtor call with typed variadic argument (or missing postblit)

2024-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18029

ilya.ya...@gmail.com changed:

   What|Removed |Added

 CC||ilya.ya...@gmail.com

--- Comment #1 from ilya.ya...@gmail.com ---
The arguments are most definitely copied, one can easily see that by taking the
addresses of `vals[0]` and `a0` respectively. The spec is also pretty clear
that the contents of the array is invalid after the function exits, see 5.
here:
https://docarchives.dlang.io/v2.076.0/spec/function.html#typesafe_variadic_functions

So, that a0 remains unchanged is not really a mystery.

It is weird though, that neither copy constructor nor postblit is called (I
tried adding a copy constructor), probably some kind of optimization? But
should we require typed varargs to always be const then?

Then, the default opAssign calls the destructor on the lvalue being assigned.
That seems to be correct, but since the value was never constructed, this
causes a disparity in constructor/destructor calls you observe.

--


[Issue 18029] extra dtor call with typed variadic argument (or missing postblit)

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18029

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 18029] extra dtor call with typed variadic argument (or missing postblit)

2017-12-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18029

Ketmar Dark  changed:

   What|Removed |Added

 CC||ket...@ketmar.no-ip.org

--