BSONObjBuilder append* functions should all return ref to *this

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.1
    • Affects Version/s: 4.3 Required
    • Component/s: Internal Code
    • Fully Compatible
    • ALL
    • Dev Tools 2019-06-17
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      appendUndefined(), for example, returns nothing.
      They all need to return a reference to *this to be used in fluent builder expressions, which BSONObjBuilder is designed to support.

      BSONObj obj = BSONObjBuilder()
          .append("a", 123)
          .appendUndefined("b")    // fail here
          .obj();
      

      This fails because appendUndefined isn't following the convention.

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

              Created:
              Updated:
              Resolved: