In a file there is an anonymous namespace and a named namespace. Anonymous namespace has some internal function which should not be exposed and the named namespace has some overloaded functions which need to be accessed.
//test.cpp
namespace
{
void func() {}
void crazy()
{
func(a);
}
}
namespace useful
{
void func(int a)
{
//something
}
}
Can someone suggest me how to access a named namespace which is written below it ? Is it okay to access a function of a named namespace from an anonymous namespace ?
useful::func(int)?::crazy()needs to be defined AFTER a declaration ofuseful::func(), not before.