But, then, of course, that function has to be called either in main() or elsewhere on all streams that you will be using.
If you wanted to actually get the behavior you described (static initialization) for cout, you would need to wrap the functionality inside a class constructor, and construct a static object of that class. As so:
The construction of the stream initializer will call the init_stream_flags on std::cout. Of course, that assumes that std::cout itself has already been initialized, which is not guaranteed, and thus, not a safe assumption to make.
Uh what could happen if it's not initalized and I do assume?
Anything can happen, it is undefined behavior. The more likely outcomes are that nothing happens (and your flag setup is inaffective), or that your program crashes before it even starts executing the main() function.
Whether cout will be initialized at the point where you set the flags depends on the compiler, the platform and the order in which the linker decides to arrange things. Quite unpredictable.