I have a relatively simple example of making an oid with mongocxx driver. It is as follows:
try {
// assetId is const UInt8 *
bsoncxx::oid id = bsoncxx::oid{std::string((const char *)assetId)};
} catch (const std::exception& xcp) {
std::cout << "-------------" << std::endl;
std::cout << "connection failed: " << xcp.what() << "\n";
std::cout << "-------------" << std::endl;
return kDRMSKDServerDBAssetIDErr;
}
However I keep getting: unknown bsoncxx error code
I have no idea what I'm doing wrong.