why? you do know what are we talking about.
I've had to twice copy bits of context you'd deleted in order to make
my point. If I'm going to post a comment on some code or a response to
a question, I want my post to also contain that code or question.
Otherwise anyone reading it has to go back to previous messages in the
thread to understand what I'm on about. And I understand that forcing
people to have to do that is considered impolite.
the name of function doesn't suggest anything to a compiler. the
program is well-formed no matter how functions are named.
OK, we're into the precise definition of well-formed here aren't we.
And I'm not sure what that is. If I've got you right, you're argument
is that
int* i = third_party_library_function();
int& j = *i;
is well formed even if it may invoke undefined behaviour, because the
null pointer comes from outside _your_ code.
If that's what you're saying then I'll have to leave it to someone else
to explain whether the code is well formed. There _may_ be a
distinction between the case where third_party_library_function is
expected to return zero and the case where third_party_library_function
can never return zero (except it does because it has a bug).
Incidentally, I seem to be losing the space before j and after &. I've
no idea why.
Gavin Deane