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

Remove all uses of boost/optional_io.hpp

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service Arch 2022-08-08

      • Extend unittest ASSERTs and Matchers to print optionals. Most uses of optional_io.hpp are for _test.cpp files and will be unnecessary when we teach the test ASSERT macros to print optionals.
      • Outside of that use, there are only about 3 places in the codebase that need to use optional_io.hpp in production code. Rewrite these uses to use the utilities provided by new header mongo/util/optional_util.h.

      optional_util.h will provide a wrapper that can stream optionals:
      It's pretty straightforward. Instead of:

          std::cout << someOptional;
      

      They'll just use:

          std::cout << optional_io::Extension{someOptional};
      

      This will use the same format as boost/optional_io.hpp but will
      also support std::optional.

            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: