G++ std::is_function 实现:_ArgTypes后跟 6 个句点是什么意思
g++ std::is_function implementation: what does _ArgTypes followed by 6 periods mean?
我正在查看我的标头 (g++-4.5.2) 以获取 中某些模板的实现,我发现了以下内容:
/// is_function
template<typename>
struct is_function
: public false_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...)>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......)>
: public true_type { };
前两个声明似乎是合理的,但我无法弄清楚第三个声明是如何工作的。什么是......
?我在标准中寻找它,但找不到任何东西。
它与:
_Res(_ArgTypes..., ...)
省略号参数前面的逗号是可选的。
此模板处理函数中的可变长度参数。例如:
void foo(bool, char, int...)
相关文章:
- 在 OpenCV C++ 中估计基本矩阵之前对相应点进行归一化的正确方法是什么?
- 在 c/c++ 中打开 PhysicalDrive 的句柄并写入 MBR 的 linux 等效是什么?
- 这句话是什么意思 - " vector<long long> distance(n, std::numeric_limits<long long>::max()); "?
- 这句话是什么意思? "ret += (sx+ey)%2 ? 3 : 1, sx++;"
- 这句C++是什么意思?BaseWindow() : m_hwnd(NULL) { }.
- 这句话是什么意思?半 += 字符串(频率[i] / 2, i + 'a');
- 点在printf函数中是什么意思
- 在CUDA中使用小M的两个MXN矩阵执行矢量点产品的最快方法是什么?
- 根据浮点符号对浮点进行舍入的最简单方法是什么
- 检测特定像素上的某种颜色并在检测到后发送点击的最快方法是什么?
- 此背包代码显示浮点[float]无效类型错误.可能是什么原因
- qt c++ 中的这句话是做什么的
- 搜索一组点,其长度总和最小为矩形.算法是什么
- 我不明白这句话是什么意思?
- 模板参数包中的 6 个点是什么
- main函数-返回值的点是什么
- 这句话是什么意思?
- C++,这句话是什么意思
- G++ std::is_function 实现:_ArgTypes后跟 6 个句点是什么意思
- c++中方括号内的双点是什么意思?