Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-100

Switch from boost::shared_ptr to std::shared_ptr

    Details

    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:
      None
    • Location:
      PR

      Description

      I would like to switch our code from boost::shared_ptr to std::shared_ptr. If allowed, I would extend this to include all other boost:: classes that now have standard equivalents, such as boost::unordered_map.

      boost works, so why bother? I see several advantages:

      • It makes our code more standard, so less likely to confuse new developers and outsiders.
      • Code that uses a mix of unique_ptr and shared_ptr would be less confusing.
      • It would also give us a more accurate picture of what parts of boost we truly rely on, in hopes of eventually ending our use of boost entirely.

      Acceptance of this RFC does not imply that it is a high priority. It simply gives us a go-ahead to write a ticket and implement the ticket when we have time. I have not looked deeply at the code to estimate how much effort is required, but I don't expect it to be very much. We have to change the definition of PTR and CONST_PTR and then clean up some additional code.

        Attachments

          Issue Links

            Activity

            Hide
            swinbank John Swinbank added a comment -

            Tim Jenness – I don't intend to schedule any more work which is directly addressing this RFC. However, I didn't file it; I think it's Russell Owen's call as to whether or not it's been implemented to his satisfaction.

            Show
            swinbank John Swinbank added a comment - Tim Jenness – I don't intend to schedule any more work which is directly addressing this RFC. However, I didn't file it; I think it's Russell Owen 's call as to whether or not it's been implemented to his satisfaction.
            Hide
            rowen Russell Owen added a comment -

            As long as the developer documentation is clear that we should prefer std to boost, I think we can close this as implemented.

            Show
            rowen Russell Owen added a comment - As long as the developer documentation is clear that we should prefer std to boost, I think we can close this as implemented.
            Hide
            swinbank John Swinbank added a comment -

            Ah, good point – looks like this being implemented is blocked on RFC-185 being implemented, and that's still got a ticket in review.

            Show
            swinbank John Swinbank added a comment - Ah, good point – looks like this being implemented is blocked on RFC-185 being implemented, and that's still got a ticket in review.
            Hide
            pschella Pim Schellart [X] (Inactive) added a comment -

            RFC-185 is now implemented.

            Show
            pschella Pim Schellart [X] (Inactive) added a comment - RFC-185 is now implemented.
            Hide
            swinbank John Swinbank added a comment -
            Show
            swinbank John Swinbank added a comment - Thanks Pim Schellart [X] !

              People

              • Assignee:
                rowen Russell Owen
                Reporter:
                rowen Russell Owen
                Watchers:
                Gregory Dubois-Felsmann, Jacek Becla, Jim Bosch, John Swinbank, Kian-Tat Lim, Pim Schellart [X] (Inactive), Russell Owen, Tim Jenness
              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Planned End: