In C++, I know that if I declare a function with static, it names will only exist to the compilation unit where it is declared / defined:
static void MyFunction() {...}
Also, if I declare my function inside an anonymous namespace, its name will only exist in the local compilation unit:
namespace
{
void MyFunction() {...}
}
Also, I can use static inside the anonymous namespace:
namespace
{
static void MyFunction() {...}
}
Is there any difference between those definitions?
Thank you