Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-556

overload methods that accept views to take ownership if passed a value

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      this conversion operator seems nice, but is very error prone.

      example:

      options::find opts;
      find.sort(document{} << "foo" << 1 << finalize);
      col.find({}, opts);

      The temporary value created is converted to a view and then stored in the options struct. Then it is left dangling, which causes a crash in the subsequent call to find.

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: