Edit

Share via


Compiler Error C2879

'symbol' : only an existing namespace can be given an alternative name by a namespace alias definition

You cannot create a namespace alias to a symbol other than a namespace.

The following sample generates C2879:

// C2879.cpp
int main() {
   int i;
   namespace A = i;   // C2879 i is not a namespace
}