Is the following C++ code valid?
namespace Foo
{
class Bar
{
// Class code here.
};
}
namespace Foo
{
namespace Bar
{
void SomeFunction();
{
// Function code here.
}
}
}
In other words, can there be a namespace with the same name as a class?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…