jeudi 26 mai 2016

mongodb mongocxx C++11 - find_on(): error:

I wrote something like:

bsoncxx::document::value filter_document =  document{}
      << "_id" << bsoncxx::oid  { strJobID }
      << finalize;
auto retVal = collTasks.find_one(
      filter_document, mongocxx::options::find {});

Result:

../src/CMongo.cpp:371:73: 
error: cannot bind 
‘bsoncxx::v_noabi::document::value’ lvalue to
‘bsoncxx::v_noabi::document::value&&’
       auto retVal = collTasks.find_one(filter_document, MyFindOptions);

It's looking pretty much like the example. and the type of the argument is viwe_or_value...

Aucun commentaire:

Enregistrer un commentaire