boost::shared_polymorphic_downcast disappeared between boost 1.52.0 and 1.53.0 . Nothing is mentioned about this in the release notes, and commit (r81463) contains only the cryptographic message of the journal "Update shared_ptr casts."
It is not clear to me what I should use instead, or why this function was removed. Can anyone help?
EDIT: Thanks to everyone for the insightful comments. I'm a little upset that the promotion will make backward-incompatible changes to the release without any excuses or notifications, and I also find it disappointing that they remove useful features. But based on the answers, I can do what I want in two lines of code instead of one, so I think that will be enough. However, I leave this question βunansweredβ because no one provided an easy way to get the old behavior of boost::shared_polymorphic_downcast ; that is, use dynamic_cast when debugging is enabled, and static_cast if it is not.
source share