Proposal: .isizeof property for compile-time instance size
Sean Kelly
sean at f4.ca
Fri Apr 14 10:15:13 PDT 2006
Bruno Medeiros wrote:
> Sean Kelly wrote:
>>
>> As long as there's some way to get the size of classes at compile time
>> I'll be happy :-)
>
> Why do you want this anyway?
Mostly to be able to construct classes in places other than GC managed
memory. Memory mapped files for example, fixed-size arrays within GCed
classes, stack-based arrays, etc. Some of these can be accomplied using
.classinfo.init.sizeof or whatever, but others require the size to be
known at compile-time.
Sean
More information about the Digitalmars-d
mailing list