inline namespace mongo::literals for UDLs

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • Dev Tools 2020-03-09, Service Arch 2020-04-06
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We have seen in logv2 cleanup that there are places that are not in the mongo namespace lexical scope, but need our UDLs like `::mongo::operator"" _attr`.

      We need to add a using directive to get the `_attr` UDL. We would NOT want to bring in all of ::mongo though. We should do what std does, and make a nested inline namespace: ::mongo::literals to hold our UDLs so you can get them without bringing in other ::mongo names. We could go further and make namespaces further nested inside literals like std::literals::string_literals and std::literals::chrono_literals, but I don't think we need to go that far. mongo only has a few UDLs.

      This will help us introduce logv2 into arbitrary mongo code.

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

              Created:
              Updated:
              Resolved: