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

inline namespace mongo::literals for UDLs

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.7.0
    • None
    • Internal Code
    • None
    • Fully Compatible
    • Dev Tools 2020-03-09, Service Arch 2020-04-06

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: