How do I ensure that the initialization of a static field happens only once inside a lambda's body (or a function's)?
[] (string foo) {
static flat_hash_set<string> set;
// code to populate the set with some items.
// Question: how do I ensure this population code executed exactly once?
return set.contains(foo);
}
static set<string>set = createSet();