Structs are Not Plain: A call for empty struct constructors

Max Samukha maxsamukha at
Fri Sep 20 05:00:13 UTC 2019

On Thursday, 19 September 2019 at 20:25:53 UTC, Jonathan M Davis 
> with(Fixture.cons())
> {
> }

That is UB. The spec does not state clearly, in which cases RVO 
will be applied. One may not assume that the destructor won't be 
called again on the already destructed object.

More information about the Digitalmars-d mailing list