【发布时间】:2011-06-23 09:56:33
【问题描述】:
我有一个带有一个参数的模板函数。 我必须实例化该函数而不调用该函数意味着我必须明确地实例化。
我有这个功能:
template <class T> int function_name(T a) {}
我这样实例化了那个函数:
template int function_name<int>(int);
但我收到以下错误:
error: expected primary-expression before 'template'
error: expected `;' before 'template'
【问题讨论】: