尝试将元素附加到文档时出现错误。
bsoncxx::document::value _obj; //This is Declaration of _obj in diffrent file
bsoncxx::document::element element = _obj.view()[sFieldName];
if (element.length() && element.type() == bsoncxx::type::k_document)
{
bsoncxx::builder::basic::document bsonBuilder;
bsonBuilder.append(element); //Getting Error
}
错误:错误 C2664 'void bsoncxx::v_noabi::builder::basic::sub_document::append_(bsoncxx::v_noabi::builder::concatenate_doc)':无法从 'bsoncxx::v_noabi::document: 转换参数 1: :element' 到 'bsoncxx::v_noabi::builder::concatenate_doc'
请帮我解决这个问题,如何将元素转换为文档或将元素附加到文档。
谢谢