[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]
In MSVC 2008 Express, following code raises error.
template class A { int Func(int (*f)(const T, const T)); } static int TagF(const Tag* a, const Tag* b){...} int main() { A a; a.Func(TagF); // error : type of 1st parameter is mismatch...bla-bla... }
Intersetingly, following is well-compiled in MSVC 2008 Express.
// Definition of Class A is same with above. typedef Tag* PTag; static int TagF(const PTag a, const PTag b) {...} int main() { A a; a.Func(TagF); }
Is it a bug of MSVC? or Do I miss something????
'Language > C&C++' 카테고리의 다른 글
[C/C++] Memory(Heap) alloc/free interface for the library. (0) | 2010.04.20 |
---|---|
[C/C++] Mimicking Signal and Slot (0) | 2010.04.08 |
[C/C++] classifing function return value type... (0) | 2009.09.02 |
[C/C++] new operator... deeper.... (0) | 2009.08.24 |
[C/C++] Remind! Limitation of constructor; It doens't give return value!.. (0) | 2009.05.15 |