次の方法で共有


コンパイラ エラー C3207

'function': 'arg' の無効なテンプレート引数です。クラス テンプレートが必要です

関数テンプレートは、テンプレート テンプレート引数を受け取ると定義されます。 しかし、テンプレート型引数が渡されました。

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

// C3207.cpp
template <template <class T> class TT>
void f(){}

template <class T>
struct S
{
};

void f1()
{
   f<S<int> >();   // C3207
   // try the following line instead
   // f<S>();
}