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

remove dangerous streaming operators in sdam tests

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

      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@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: