【发布时间】:2020-01-31 16:16:21
【问题描述】:
最近看了一些关于websocketpp的代码,下面的代码是我比较疑惑的:
#include <somefile.hpp>
template <typename config>
class endpoint : public config::socket_type { //--------A--------//
typedef typename config::concurrency_type concurrency_type;//-----B------//
....
}
在 somefile.hpp 中,有一个命名空间,也称为 config。所以我不知道 A 和 B 中的名称“config”是表示该命名空间还是模板参数。 我猜是模板参数。
感谢所有问我问题的人。
【问题讨论】:
标签: c++ c++11 templates namespaces