BSONComparator should delete rvalue ref-qualified makeContainer() functions

XMLWordPrintableJSON

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

      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:
            Drew Paroski
            Reporter:
            Kyle Suarez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: