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