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

Reevaluate Future move semantics

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Future currently takes a non-standard approach to moves. It uses the ResetOnMoveOptional type internally, an object that implements the boost::optional API with implicit reset on move. A number of tests make the assumption that Future objects are valid after being moved-from, and even validate aspects of that behavior. These have caused pain in the v5 toolchain upgrade project in the form of compiler and clang-tidy warnings that we've had to silence.

      Revisit the original decisions that created the ResetOnMoveOptional type and the tests that use-after-move intentionally. If we can avoid their uses, remove them. Otherwise, revisit the warning suppressions and either fix them or document why they are needed and why the underlying operations are safe.

            Assignee:
            Unassigned Unassigned
            Reporter:
            james.bronsted@mongodb.com James Bronsted
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None