当我尝试返回结构时,c ++函数返回类型不完整

时间:2018-01-12 22:07:23

标签: c++ mongodb bson mongo-cxx-driver

这是我的功能:

bsoncxx::types::b_utf8 read_command(bsoncxx::document::view* bson_message) {
    ...
    return (*tag).get_utf8(tag->key());
}

我使用get_utf8()根据其specification将返回types::b_utf8元素。但我收到以下错误:

error: return type 'struct bsoncxx::v_noabi::types::b_utf8' is incomplete
 bsoncxx::types::b_utf8 read_command(bsoncxx::document::view* bson_message) {

我可以清楚地看到b_utf8 struct位于types命名空间内的bsoncxx命名空间内。我做错了什么?

0 个答案:

没有答案