|
Boost Users : |
Subject: Re: [Boost-users] Problem with shared_ptr
From: Igor R (boost.lists_at_[hidden])
Date: 2009-01-14 07:53:56
> boost::shared_ptr<DerivedClass> ptr =
> boost::dynamic_pointer_cast<DerivedClass>(en);
>
> //Error when push_back. Instead of ptr, I get 0
> result.push_back(ptr);
Are you sure ptr is non-zero? Probably, dynamic_pointer_cast failed
and returned 0.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net