Static classes vs namespaces in C++

I was implementing a Logger feature in my project when I had to decide how it should work. So, I had three options in mind of how to do this: a singleton object, which would require lots of references to it in the other classes of the project, a regular object, which would require instantiating it everywhere it was needed or, a static class, which would only require including the Logger’s header in the file that was going to use it.

Continue reading…