我使用 intel 编译器,因为 intel 并不真正支持 -Wall 我使用 -Wremarks 来警告...
我有这个简单的代码,它只是制作一个特定的对象..
template<typename... Args_t>
static inline Obj makeObj(Args_t&&... args) {
auto obj = std::make_shared<Obj>(args...); // probably can forward but doesn't matter..
return obj;
}
我得到了这句话:
remark #869: parameter "args" was never referenced
这是一个错误吗?有人看到了吗?
最佳答案
这只是一个错误警告 that was already reported in the Intel forum .它没有任何特殊意义,因为代码完全没问题(尽管你应该考虑完美转发)。
关于c++ - 可变参数模板的英特尔编译器错误评论?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26648632/