remove dangerous streaming operators in sdam tests

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service arch 2020-11-02
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Defining unconstrained mongo::operator<< functions as we do in sdam_test_base.h carries a significant risk of One Definition Rule violations. These are motivated entirely by a desire to be interoperable with ASSERT macros. I encountered them in SERVER-50516. I believe they are the only ones of their kind, because a previous sweep removed a few of the other unconstrained operator<< that were around the codebase.

      We can work around the need for these by introducing a wrapper that provides a customized streaming operator to its argument.

            Assignee:
            Billy Donahue
            Reporter:
            Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: