I can imagine one case, in which the input parameter could be NULL so that pass-by-pointer is preferred but not pass-by-reference?
Can anybody add more cases?
In addition to some other answers about ownership semantics (especially factory functions).
While not a technical reason, a common style guide requirement is that any parameters that may be modified should be passed by pointer. This makes it obvious at the callsite that the object may be modified.
void Operate(const int &input_arg, int *output_arg) {
*output_arg = input_arg + 1;
}
int main() {
int input_arg = 5;
int output_arg;
Foo(input_arg, &output_arg); // Passing address, will be modified!
}