Compiler Error C2871
'name' : a namespace with this name does not exist
This error will occur when you pass an identifier that is not a namespace to a using directive.
Example
The following sample generates C2871:
// C2871.cpp
// compile with: /c
namespace a {
int fn(int i) { return i; }
}
namespace b {
using namespace d; // C2871 because d is not a namespace
using namespace a; // OK
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for