Why not simply write the following?
const Config config { loadConfig() }; for (auto &name : config.names) { use(name); }