When using an anonymous namespace are there any issues if it is nested within another namespace? For example, is there any real difference between Foo1.cpp and Foo2.cpp in the following code:
// Foo.h
namespace Foo
{
void fooFunc();
}
// Foo1.cpp
namespace Foo
{
namespace
{
void privateFunction()
{
...
}
}
void fooFunc()
{
privateFunction();
}
}
// Foo2.cpp
namespace
{
void privateFunction()
{
...
}
}
namespace Foo
{
void fooFunc()
{
privateFunction();
}
}