Uploaded image for project: 'ICU'
  1. ICU-13081

C++ moveFrom() functions: remove? or make stable?

    Details

    • Type: New Feature/API (Proposal Required)
    • Status: Done (View workflow)
    • Priority: medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 64.1
    • Component/s: others
    • Labels:
      None
    • Time Needed:
      Hours
    • tracCc:
      andy,pedberg,srl
    • tracOwner:
      markus
    • tracProject:
      ICU4C
    • tracReporter:
      markus
    • tracStatus:
      design
    • tracWeeks:
      0.1

      Description

      When I added move constructors and move assignment operators to some ICU C++ classes, I made them conditional on having C++11 compiler supported, and I also added moveFrom() functions that work with older C++ versions.

      See for example UnicodeString::moveFrom().

      Now that we require C++11, these are redundant with using std::move().

      We kept these @draft. We could remove them, forcing anyone who was using them explicitly to switch to standard C++11 syntax.

      Or, we could decide to keep them and make them @stable, because they are "harmless" and nicely explicit – but we would perpetuate two ways of achieving the same thing, a standard way and an ICU-specific way.

      I assume that we will not want to add moveFrom() functions to other classes if & when we add move support there.

        Attachments

          Activity

            People

            • Assignee:
              markus.icu Markus Scherer
              Reporter:
              markus.icu Markus Scherer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                tracCreated: