But if someone wanted to hide their code & keep them separate? I suppose it would work just find in modules as they are kept together, but I am not ready to delve into modules just yet.
What is everyone else using as an alternative to singleton's, unique_ptr?
I have never had the need for a pure singleton. Ive had plenty of classes where I only created one object from it, but actively preventing making more just never seemed useful. Ive also had static data classes where making a second one was just a copy of the first in a new scope, granting access to basically global variables, which is more or less the same idea but without the one instance locker or funky pointer accessors etc.