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

remove dangerous streaming operators in sdam tests

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • None
    • None
    • Fully Compatible
    • Service arch 2020-11-02

    Description

      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.

      Attachments

        Activity

          People

            billy.donahue@mongodb.com Billy Donahue
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: