|
|
|
|
|
by frutiger
777 days ago
|
|
> I think everyone would do well to avoid "but I don't need it, so it seems unnecessary" kinds of arguments This is an uncharitable characterisation of what I said. > References get returned all the time because you want to access some state store's vector of things without copying the vector just to ask "are any of the elements X?" This is what const references are for. Returning an optional<vector<T>&> to query if it contains an element would not be appropriate. |
|