D vs. placement new (for classes) aka why D needs .sizeof and .alignof for classes (values not references)

Frank Benoit (keinfarbton) benoit at tionex.removethispart.de
Thu Apr 12 18:21:32 PDT 2007


torhu schrieb:
> Frank Benoit (keinfarbton) wrote:
>>> Which you know, and does as you say.  But then there is:
>>> obj.classinfo.init.sizeof
>>>
>>> Which will render the actual size of class instances.  :)
>>
>> no, it doesn't :)
> 
> obj.classinfo.init.length is documented as 'init.length gives size in
> bytes of class'.

well, i don't know about the size of the class, but it does not give the
size of the class /instance/.



More information about the Digitalmars-d mailing list