determining if a void* points to a valid Object

Luís Marques luismarques+spam at gmail.com
Thu Aug 17 16:59:23 PDT 2006


BCS wrote:
> casting works but the result is invalid.
> 
> This OTOH
> 
> cast(Derived)cast(Object)v;
> 
> seg-v's on a struct.
> 
> Should this be a bug?

How are you doing that? if v is a struct than casting it to Object fails 
(it does here...). If you cast it to void* first than that would be your 
way of saying "I know what I'm doing", so I guess it wouldn't be a bug 
(not the case, right?).



More information about the Digitalmars-d mailing list