mongo-cxx-driver,bson_value::view::get_string() 和 document::element::get_string() 的实现在哪里?

问题描述 投票:0回答:1

我做了一个

grep
,只看到了两个函数的
... get_string const;
声明,在github.com/mongo-cxx-driver/src中的任何hpp或cpp文件中没有实际实现。有谁知道他们住在哪里吗

c++ mongodb mongo-cxx-driver
1个回答
0
投票

这是通过名称修饰/修饰完成的,因此代码源中的

grep
get_string
没有返回任何函数定义。

//bsoncxx/v_noabi/bsoncxx/document/element.cpp
#define BSONCXX_ENUM(name, val) \
    types::b_##name element::get_##name() const { \
    ...

//bsoncxx/v_noabi/bsoncxx/enums/type.hpp
BSONCXX_ENUM(string, 0x02)
© www.soinside.com 2019 - 2024. All rights reserved.