Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23758

Non CLang compliant use of std::move

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.5
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 13 (04/22/16)

      the std::move of returned objects can prevent copy elision hence should be avoided. While unique_ptr does not have lvalues copy c-tor the return value from function is an rvalue so the move c-tor can be used.

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: