共用方式為


編譯器錯誤 C3738

'calling_convention':明確具現化的呼叫慣例必須符合要具現化的範本慣例

建議您不要在明確具現化上指定呼叫慣例。 不過,如果您必須符合呼叫慣例。

範例

下列範例會產生 C3738。

// C3738.cpp
// compile with: /clr
// processor: x86
#include <stdio.h>
template< class T >
void f ( T arg ) {   // by default calling convention is __cdecl
   printf ( "f: %s\n", __FUNCSIG__ );
}

template
void __stdcall f< int > ( int arg );   // C3738
// try the following line instead
// void f< int > ( int arg );

int main () {
   f(1);
   f< int > ( 1 );
}