【发布时间】:2011-05-17 10:10:10
【问题描述】:
谁能告诉我如何使以下伪代码与 GCC4 兼容?我想知道它在 MSVC 下是如何工作的...
typedef int TypeA;
typedef float TypeB;
class MyClass
{
// No base template function, only partially specialized functions...
inline TypeA myFunction<TypeA>(int a, int b) {} //error: Too few template-parameter-lists
template<> inline TypeB myFunction<TypeB>(int a, int b) {}
};
【问题讨论】:
标签: c++ templates visual-c++ gcc partial-specialization