【发布时间】:2015-04-05 22:40:43
【问题描述】:
假设我已经声明:
template <typename T> void foo(T& t);
现在,有什么区别
template <> void foo<int>(int& t);
和
template void foo<int>(int& t);
语义上?并且没有括号的模板和带空括号的模板在其他上下文中有其他语义吗?
相关: How do I force a particular instance of a C++ template to instantiate?
【问题讨论】:
标签: c++ templates template-specialization