为什么模板函数加了__stdcall修饰后编译器不认呢?(vc6.0环境)
aiirr 2005-11-07 05:25:19 #include <iostream>
using namespace std;
template<class c>
void __stdcall f(){ cout << "Size = " << sizeof( c ) << endl; }
typedef void ( __stdcall *PF )();
void a(PF f)
{
f();
}
void main()
{
f<int>(); //可以
a(f<int>); //不可以,说f<int>不是__stdcall类型的
//我就奇了怪了,为什么模板函数加了__stdcall修饰后编译器不认呢?如果不是模板函数,是可以的。
}