On Sunday, 15 May 2022 at 16:08:01 UTC, Mike Parker wrote:

`scope` in a class variable declaration will cause it to the class to be allocated on the stack.


Common practice is that a class has class members itself. So where are they allocated? Most likely is only the top class that is on the stack, the class members are allocated on the heap because the constructor is already compiled.

That scope isn't that useful unless you have it like C++, that expands class members in the parent class.



Reply via email to