变体模板 [英] Variadic templates

查看:219
本文介绍了变体模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了很多链接介绍可变参数模板。但我从来没有见过任何可证明这种方法的例子。

I have seen a lot of links introducing the variadic templates. But I have never seen any compilable example that demonstrates this approach.

有人能给我提供一些链接,可以找到这样的可编译的例子吗?

Could someone provide me with some links in which such compilable examples can be found?

推荐答案

可变模板是尚未正式发布的C ++ 0x标准的一部分。从版本4.3开始,它们由gcc支持,但是您需要通过添加编译器开关-std = c ++ 0x来启用对C ++ 0x的支持。

Variadic templates are part of the C++0x standard which is not yet officially released. They are supported by gcc since version 4.3, but you need to enable support for C++0x by adding the compiler switch -std=c++0x.

这篇关于变体模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆