次の方法で共有


コンパイラ エラー C3212

'specialization': テンプレート メンバーの明示的特殊化は、明示的特殊化のメンバーである必要があります

明示的特殊化の形式が正しくありません。

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

// C3212.cpp
// compile with: /LD
template <class T>
struct S {
   template <class T1>
   struct S1;
};

template <class T>   // C3212
template <>
struct S<T>::S1<int> {};

/*
// try the following instead
template <>
template <>
struct S<int>::S1<int> {};
*/

/*
// or, the following
template <>
struct S<int> {
   template <class T1>
   struct S1;
};

template <>
struct S<int>::S1<int> {
};
*/