Storing arrays as Variant types.

Winter M. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 23 14:57:07 PST 2014


I've run into a problem while trying to coerce array values from 
a variant; specifically,

char[] a = aVariant.coerce!(char[]); // This works just fine.

byte[] b = bVariant.coerce!(byte[]); // This causes a static 
assertion to fail.

I'm not really sure why a byte[] would be an unsupported type, 
since memory-wise the reference should take up as much space as 
for the char[] (as I understand it).
Perhaps I'm missing something, but I'm lost as to why this is the 
case.

Thanks.


More information about the Digitalmars-d-learn mailing list