A Dynamic Initialization Deep-Dive: Abusing Initialization Side Effects

I recently ended up building a configuration system for a piece of C++ software I&rsquo;m maintaining. One feature I wanted was: I want to just create new configuration items at arbitrary locations in my code without &ldquo;registering&rdquo; them somewhere centrally. The config system should just &ldquo;pick them up&rdquo; on startup. One prominent example of a library using a similar…