We decided to static_cast the template parameter T of ref_ptr to a Referenced. This allows us to create ref_ptr's to forward declared types.
However this is very dangerous, as it completely circumvents the type checks. This will not work for types with multipe and/or virtual inheritence.
Do we want the forward declaration feature that badly, that we can accept dangerous code?
I don't think it is acceptable to use dangereous code without checking for erroneous cases (which requires the class to be declared at compile time, and not just an available forward declareation).
We decided to static_cast the template parameter
T
ofref_ptr
to aReferenced
. This allows us to createref_ptr
's to forward declared types. However this is very dangerous, as it completely circumvents the type checks. This will not work for types with multipe and/or virtual inheritence.Do we want the forward declaration feature that badly, that we can accept dangerous code?