I have a function that processes a given vector, but may also create such a vector itself if it is not given.
I see two design choices for such a case, where a func
I agree, I would use two functions. Basically, you have two different use cases, so it makes sense to have two different implementations.
I find that the more C++ code I write, the fewer parameter defaults I have - I wouldn't really shed any tears if the feature was deprecated, though I would have to re-write a shed load of old code!