On 03/16/2011 04:28 AM, bearophile wrote:
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

QtD's static_cast is not part of the public API. It is an internal helper function that was supposed to be simple and hacky.

Reply via email to