I think the whole `private` section could be moved into the source file. Use an anonymous namespace for the AgentRegistryEntry struct and make the agentRegistry and agentRegistryMap functions static globals (which are only visible in the compilation unit).