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

Consider changing BSONElement::operator[] to take StringData instead of const string&

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.10
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Query 2017-07-10

      It is common in our code base to access BSONObj and BSONElement representing an object via operator[] passing a const c-string for field name. While BSONObj takes StringData for operator[], BSONElement take const string&, which when passed a c-string will result in creation of a std::string object.

            Assignee:
            james.wahlin@mongodb.com James Wahlin
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: