structs vs classes

Simen kjaeraas simen.kjaras at gmail.com
Sat Jan 29 13:36:37 PST 2011


Patrick Kreft <patrick_kreft at gmx.net> wrote:

> On Sat, 29 Jan 2011 15:45:41 +0100, Tomek Sowiński <just at ask.me> wrote:
>
>> Jim napisał:
>>
>>> I'm only discussing the heap/stack difference.
>>
>> Classes with value semantics would be prone to the slicing problem.
>>
>
> That is because of the type system not classes or value semantic cause  
> of that.

Really? How would I go about stuffing a 16-byte class instance into the
8 bytes allocated on the stack, anyway?

-- 
Simen


More information about the Digitalmars-d mailing list