摘要:
让gcc支持成员函数模板的trick
同样的代码在 VS2010 中编译运行是没有问题的,但在 gcc 4.7.3下,编译都通不过:
../src/MemFunTemplate.h:21:14: error: explicit specialization in non-namespace scope ‘struct Functor’
../src/MemFunTemplate.h:22:24: error: template-id ‘function’ in declaration of primary template
../src/MemFunTemplate.h:26:14: error: explicit specialization in non-namespace scope ‘struct Functor’
../src/MemFunTemplate.h:26:38: error: template-id ‘function’ in declaration of primary template
../src/MemFunTempla 阅读全文