Daniel Gibson:

> This check may make sense, but this cast could even work on 
> pointers-to-structs if they are similar, something like

I suggest to keep purposes separated, to keep the semantics of the program 
cleaner and to avoid some bugs, letting staticCast work with just objects.

A different function is for structs, that tests the first fields of the second 
struct are all present in the same order in the first struct :-)

Bye,
bearophile

Reply via email to