小编Igo*_*kov的帖子

C++可变参数模板不寻常的例子

以下结构意味着什么?

#include <iostream>

template <int ...> struct s;

int main() {
    int i = s<,>::xxx;

    std::cout << i << std::endl;
}
Run Code Online (Sandbox Code Playgroud)

它由gcc 4.4.5+编译并在执行时输出0.

c++ gcc templates variadic c++11

12
推荐指数
1
解决办法
402
查看次数

标签 统计

c++ ×1

c++11 ×1

gcc ×1

templates ×1

variadic ×1