Let me elaborate on the title:

I want to implement a system that would allow me to enable/disable/modify the general behavior of my program. Here are some examples:

* I could switch off and on logging
* I could change if my graphing program should use floating or pixel coordinates
* I could change if my calculations should be based upon some method or some other method
* I could enable/disable certain aspects like maybe a extension api
* I could enable/disable some basic integrated profiler (if I had one)

These are some made-up examples. 

Now I want to know what the most common solution for this sort of thing is.

I could imagine this working with some sort of singelton class that gets instanced globally or in some other globally available object. Another thing that would be possible would be just constexpr or other variables floating around in a namespace, again globally.

However doing something like that, globally, feels like bad practise.

**second part of the question**

This might sound like I cant decide what I want, but I want a way to modify all these switches/flags or whatever they are actually called in a single location, without tying any of my classes to it. I don't know if this is possible however. 

Why don't I want to do that? Well I like to make my classes somewhat reusable and I don't like tying classes together, unless its required by the DRY principle and or inheritance. I basically couldn't get rid of the flags without modifying the possible hundreds of classes that used them.

**What I have tried in the past**

* Having it all as compiler defines. This worked reasonably well, however I didnt like that I couldnt make it so if the flag file was gone there were some sort of default settings that would make the classes themselves still operational and changeable (through these default values)
* Having it as a class and instancing it globally (system class). Worked ok, however I didnt like instancing anything globally. Also same problem as above
* Instancing the system class locally and passing it to the classes on construction. This was kinda cool, since I could make multiple instruction sets. However at the same time that kinda ruined the point since it would lead to things that needed to have one flag set the same to have them set differently and therefore failing to properly work together. Also passing it on every construction was a pain.
* A static class. This one worked ok for the longest time, however there is still the problem when there are missing dependencies.

**Summary**

Basically I am looking for a way to have a single "place" where I can mess with some values (bools, floats etc.) and that will change the behaviour of all classes using them for whatever, where said values either overwrite default values or get replaced by default values if said "place" isnt defined.