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

BSONComparator should delete rvalue ref-qualified makeContainer() functions

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Fully Compatible
    • Query 2020-05-04

      It's very tempting to write

      auto set = BSONElementComparator(BSONElementComparator::FieldNamesMode::kIgnore,
                                       stringDataBinaryComparator)
                         .makeBSONEltSet();
      

      but this would be wrong, as the BSONElementComparator must outlive the container. We should delete the rvalue ref-qualified versions of these functions to stop code like this from compiling.

            Assignee:
            andrew.paroski@mongodb.com Drew Paroski
            Reporter:
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: