Crafting observable settings in C++

Avoiding lifetime issues with deliberate API design and dependency inversion.