次の方法で共有


コンパイラ エラー C2770

template' の明示的な template_or_generic 引数が無効です

注釈

明示的なテンプレートまたは汎用引数を持つ関数テンプレート候補により、許可されていない関数型が生成されました。

次の例では C2770 が生成されます。

// C2770.cpp
#include <stdio.h>
template <class T>
int f(typename T::B*);   // expects type with member B

struct Err {};

int main() {
   f<int>(0);   // C2770 int has no B
   // try the following line instead
   f<OK>(0);
}