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

Allow setting string fields by without copying in IDL-generated structs

    • Service Arch
    • Fully Compatible
    • v8.0
    • Programmability 2024-05-27
    • 200

      IDL-generated setters for string fields always accept a StringData parameter, but the underlying struct data member is a std::string, so setting always requires a copy. We should also generate setters that allow moving or passing rvalues std::strings to avoid always having to copy the argument.

            Assignee:
            ryan.berryhill@mongodb.com Ryan Berryhill
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: