Construct boost::optional and std::unique_ptr decorations by zero-initing

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • Service Arch 2024-02-19, Service Arch 2024-03-04, Service Arch 2024-03-18, Service Arch 2024-04-01
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Breaking this portion out from SERVER-81848:

      We can assume that zero-init is good enough for some types that aren't trivial init, such as boost::optional (safer since we control the definition) and std::unique_ptr<T> with no custom deleter (slightly more risky since the definition is provided by the toolchain, however it is hard to imagine a practical implementation where zero filling isn't correct, and our tests would explode if it wasn't)

              Assignee:
              Alex Li
              Reporter:
              Patrick Freed
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: