Inferring loose container type based on elements that are added to it later?

Relatedly, I would also like a feature in map where I could choose not to return a value at all. Some sort of sentinel type where, when map sees it returned from the function, it just doesn’t add to the vector.