Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6002423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:58:33+00:00 2026-05-23T00:58:33+00:00

boost::shared_polymorphic_downcast and the other boost::shared_ptr functions reside in <boost/shared_ptr.hpp> I recently enabled support for

  • 0

boost::shared_polymorphic_downcast and the other boost::shared_ptr functions reside in <boost/shared_ptr.hpp>

I recently enabled support for C++11 in GCC with -std=c++0x. In order to avoid confusion, I moved from boost::shared_ptr to std::shared_ptr which resides in #include <memory>.

However it appears that shared_polymorphic_downcast is not part of the std namespace and is not included with #include <memory>.

Do you know where it is? Did I miss the deprecation memo 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:58:34+00:00Added an answer on May 23, 2026 at 12:58 am

    You either need std::static_pointer_cast or std::dynamic_pointer_cast, depending on whether you want static_cast or dynamic_cast behavior.

    Recent versions of Boost’s Smart Pointers library include these functions for boost::shared_ptr too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a std::list of boost::shared_ptr<T> and I want to remove an item from
I have the following code snippet: std::vector< boost::shared_ptr<Foo> >::iterator it; it = returnsAnIterator(); //
Right now, I have this code: bool isAnyTrue() { for(std::list< boost::shared_ptr<Foo> >::iterator i =
Are there any differences between boost::shared_ptr , std::tr1::shared_ptr and the upcoming (in C++0x )
typedef boost::shared_ptr<config_value_c> config_value_ptr; typedef std::vector<config_value_ptr> config_value_vec; config_value_vec config; typeof (config.iterator ()) it = config.iterator
So I have such function: boost::shared_ptr<my_class> get_class_by_name(std::string name) { typedef std::map<boost::shared_ptr<my_class>, my_description> map_t; BOOST_FOREACH(map_t::value_type
Can boost::smart_ptr such as scoped_ptr and shared_ptr be used in std containers such as
Why do I receive the following error for the following code? 1>C:\Libs\boost_1_44\boost/smart_ptr/shared_ptr.hpp(259): error C2683:
What's wrong with the following? typedef boost::shared_ptr SharedPtr; GCC gives the following error: ISO
In my current project I am using boost::shared_ptr quite extensively. Recently my fellow team

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.