It will raise runtime error at finish of program when using mongocxx::options::find.limit()

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Incomplete
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.0.0
    • Component/s: API
    • None
    • Environment:
      Ubuntu15.4 Clang3.6.0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      mongocxx::collection collection = conn["wechat"]["article"];
      bsoncxx::builder::stream::document condition, options;
      mongocxx::options::find opts;

      condition << "subscribeRobot" << open_document << "$exists" << 1 << close_document;
      options << "subscribeRobot" << 1;
      opts.projection(options.view());
      opts.limit(100);

      mongocxx::cursor cur = collection.find(condition.view(), opts);
      for(auto && doc:cur)

      { cout << bsoncxx::to_json(doc) << endl;}

            Assignee:
            Unassigned
            Reporter:
            zy1989 [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: