编译器错误 C3857
“type”:不允许多个类型参数列表
为同一类型指定了多个模板或泛型,这是不允许的。
下面的示例生成 C3857:
// C3857.cpp
template <class T, class TT>
template <class T2> // C3857
struct B {};
可能的解决方法:
// C3857b.cpp
// compile with: /c
template <class T, class TT, class T2>
struct B {};
使用泛型时,也可能发生 C3857:
// C3857c.cpp
// compile with: /clr
generic <typename T>
generic <typename U>
ref class GC; // C3857
可能的解决方法:
// C3857d.cpp
// compile with: /clr /c
generic <typename U>
ref class GC;