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

Remove PTR and CONST_PTR macros

    Details

    • Type: RFC
    • Status: Adopted
    • Resolution: Done
    • Component/s: DM
    • Labels:
      None

      Description

      With the adoption of RFC-100 and the completion of DM-5879 we now use std::shared_ptr and friends throughout the stack.
      We are unlikely to ever change smart pointer types again (since we are now using the standard). The pointer macros are already not consistently used. Moreover, given that C++11 no longer requires spaces between nested templates, the macros are no longer needed.
      Therefore I propose to remove them.

      In my opinion this has three benefits:

      0. It improves consistency;
      1. It improves code readability by not having to remember what the macros do;
      2. It removes undue bias towards std::shared_ptr over the often better choice std::unique_ptr.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  pschella Pim Schellart [X] (Inactive)
                  Reporter:
                  pschella Pim Schellart [X] (Inactive)
                  Watchers:
                  John Swinbank, Kian-Tat Lim, Michael Wood-Vasey, Pim Schellart [X] (Inactive), Russell Owen, Tim Jenness
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Planned End:

                    Summary Panel