摘要: C++ 11标准新增加了“可变参数模板”(variadic template)。 可变参数模板中,模板的typename个数是可变长度的。下面给个例子,已在g++ 4.6.1上编译通过,并成功运行。/* * C++11标准 可变参数模板(variadic template) 样例 * * * Copyright © 叶剑飞 2012 * * * 编译命令: * g++ myPrintf.cpp -o myPrintf -std=c++0x -Wall * */#include <iostream>#include <cstdlib>#i... 阅读全文
posted @ 2012-11-16 17:58 叶剑飞Victor 阅读(2934) 评论(0) 推荐(0) 编辑