编译器错误 C3858

“type”:不能在当前范围内重新声明

type 不能在同一范围内声明两次。

下面的示例生成 C3858:

// C3858.cpp
// compile with: /LD
template <class T>
struct Outer
{
   struct Inner;
};

template <class T>
struct Outer<T>::Inner;   // C3858
// try the following line instead
// struct Outer<T>::Inner{};