摘要:
讓gcc支持成員函數(shù)模板的trick
同樣的代碼在 VS2010 中編譯運(yùn)行是沒(méi)有問(wèn)題的,但在 gcc 4.7.3下,編譯都通不過(guò):
../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 閱讀全文
posted @ 2013-07-12 21:59
飄飄白云
閱讀(2039)
評(píng)論(0)
推薦(1)
浙公網(wǎng)安備 33010602011771號(hào)