how can I get this upcasting to work:
is it something acheivable? i have just posted the design otherwise classes contains all the constructor, members etc.
Code:
template <class T>
class BP : public T
{}
;
class DD : public class ST
{}
;
class ST
{};
int main(int argc, char** argv)
{
shared_ptr<BP<ST> > spST;
shared_ptr<BP<DD> > spDD(new BP<DD>());
spST = boost::dynamic_pointer_cast<BP<ST> >(spDD); <-----------this line throws assertion px!=0 failed
}
Comment