编译器错误 C2251

命名空间“namespace”不具有成员“member”- 是否要使用“member”?

编译器无法在指定的命名空间中找到标识符。

下面的示例生成 C2251:

// C2251.cpp
// compile with: /c
namespace A {
   namespace B {
      void f1();
   }

   using namespace B;
}

void A::f1() {}   // C2251
void A::B::f1() {}   // OK