static is a very terrible keyword because it has many different meanings depending on the context. static variables and static functions are completely different, and the static function in the class and the static free function are completely different.
A static function in a class means that a function can be called without an instance of the class, but it cannot access non-stationary members of the class. This is a bit like a regular function just nested in a class for convenience.
A static free function has an internal binding, so it cannot be seen outside the source file, and its name can be reused in other source files.
The static function of a class has no internal relationship. All class functions have an external connection. You can split the class function between the header and the source files, regardless of whether the class function is static or not.
I recommend that you read some tutorials / books to more clearly understand the many different uses of statics. When you see statics in a place that you have not seen before, do not take anything!
If you have a free function that you want to hide in the source file, you can declare it static, as you did. Alternatively, you can put it in an unnamed namespace.
It looks like
static void hiddenfunc();
And it can be called in the same way (as "hiddenfunc ()"). The advantage of unnamed namespaces (this is a strange name, I know) is that you can also place classes and other definitions that you want to see only in this source file. Just make sure that you define the function body in the namespace area {..}. Do not put the unnamed namespace in the header file.
source share