I have been using the static keyword a long time for defining internal linkage. Later, I switched to the C++ style of wrapping local things in anonymous namespaces.
If the code in your namespace is too long, there's nothing to stop you doing this:
namespace {
int foo(char* x) {
return x[0] + x[1];
}
}
namespace {
int bar(char *x, char *y) {
return foo(x) + foo(y);
}
}
In C++03 the practical advantage of using an unnamed namespace is precisely that the contents have external linkage, (but are still invisible outside the TU because there's no way to refer to them). Template parameters can't have internal linkage:
namespace {
int foo(const char* x) {
return x[0] + x[1];
}
}
static int foo2(const char *x) {
return x[0] + x[1];
}
template
void baz(const char *p) {
F(p);
}
int main() {
baz("ab"); // OK
baz("ab"); // not valid
}