Getting byte size of POD classes and dynamic arrays

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu May 16 08:18:26 PDT 2013


On 5/16/13, Byron Heads <byron.heads at gmail.com> wrote:
> On Thu, 16 May 2013 08:11:35 -0500, 1100110 wrote:
>>
>> __traits(classInstanceSize, MyClass); ?
>
> Any ideas on how to get the element type of an array
> ie:   int[]  -> int   int[][]  -> int[]

Try the ElementType template in std.range. There's also ElementEncodingType


More information about the Digitalmars-d-learn mailing list