Copy Constructor

Ali Çehreli acehreli at yahoo.com
Sun Jun 5 21:43:24 UTC 2022


On 6/5/22 12:00, Salih Dincer wrote:
 > On Sunday, 5 June 2022 at 18:43:19 UTC, Alain De Vos wrote:
 >> Does Foo(3) lives on the stack or the heap ?

I depends. I will respond to your other message.

 > Definitely not stack because that's what happens when the new operator
 > is used. Article 14.3: https://dlang.org/spec/struct.html#intro

I think you meant the other way. It is *not* on the stack if you use new.

Ali



More information about the Digitalmars-d-learn mailing list