In C ++, I know that if I declare a function with static, its names will exist only in 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 compiler:
namespace { void MyFunction() {...} }
Alternatively, I can use static inside an anonymous namespace:
namespace { static void MyFunction() {...} }
Is there a difference between these definitions?
thanks
c ++
bcsanches
source share