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

  • SEARCH
  • Home
  • 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 168207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:24:44+00:00 2026-05-11T12:24:44+00:00

The spate of questions regarding BOOST_FOREACH prompts me to ask users of the Boost

  • 0

The spate of questions regarding BOOST_FOREACH prompts me to ask users of the Boost library what (if anything) they are doing to prepare their code for portability to the proposed new C++ standard (aka C++0x). For example, do you write code like this if you use shared_ptr:

#ifdef CPPOX #include <memory> #else #include 'boost/shared_ptr.hpp' #endif 

There is also the namespace issue – in the future, shared_ptr will be part of the std, namespace – how do you deal with that?

I’m interested in these questions because I’ve decided to bite the bullet and start learning boost seriously, and I’d like to use best practices in my code.

Not exactly a flood of answers – does this mean it’s a non-issue? Anyway, thanks to those that replied; I’m accepting jalfs answer because I like being advised to do nothing!

  • 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. 2026-05-11T12:24:44+00:00Added an answer on May 11, 2026 at 12:24 pm

    The simple answer is ‘do nothing’. Boost is not going to remove the libraries that got adopted into 0x. So boost::shared_ptr will still exist. So you don’t need to do anything to maintain portability.

    Of course, once 0x is here, a lot of code can be simplified, cleaned up and optimized, but since it’s not yet here, that work can’t really begin. All you can do is make sure your code will still compile when 0x hits… and it should, just like that. Boost isn’t going to delete half their libraries. (I’m not guessing. They’ve stated this on their mailing list before)

    (and if you want to switch to the standard shared_ptr, I’d say it’s probably easier to just do a simple search/replace when the time comes. Replace #include <boost/shared_ptr.hpp> with #include <memory>, and boost::shared_ptr with std::shared_ptr)

    Or of course, you can just decide on the project that you’re going to keep using Boost’s shared_ptr. Just because it’s been added to the standard library doesn’t mean you have to use it, after all.

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

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer User.Identity.Name User is a property of the page. If you… May 11, 2026 at 2:01 pm
  • added an answer I guess the obvious choices are: o Switch to a… May 11, 2026 at 2:01 pm
  • added an answer Assuming you are not going to increase or decrease the… May 11, 2026 at 2:01 pm

Related Questions

What is the state of native SVG support in the most popular browsers in
My app keeps track of the state of about 1000 objects. Those objects are
How can I figure out the state of the files in my client, I
I am wanting to store the state of some actions the user is performing
Why are flat text files the state of the art for representing source code?
Greetings, I have two questions regarding a DataTable.Select(): 1) How to escape potential apostrophes
I have a question about best practices regarding how one should approach storing complex
I want to spruce up some areas of my website with a few jQuery
My knowledge about implementing a parser is a bit rusty. I have no idea

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.