-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- related to
-
SERVER-70086 remove extraneous include of boost/optional/optional_io.hpp
- Closed
- split from
-
SERVER-68121 clang-tool boost::optional -> std::optional migration
- Backlog