Victor Bazarov said:
Right. There are two issues here. One is about the conformance of
a C++ implementation that accepts
#include <iostream>
int main() {
std::cout << std::endl;
}
and, apparently, it's OK if including <iostream> causes the inclusion
of <ostream> which makes 'std::endl' hence defined. I.e. if such
an implementation does not complain, it is still a conforming one.
Yes, the implementation can be conforming, that code can be
considered 'well formed', by such an implementation, but the
above code is not portable.
I think perhaps this issue of 'portability' should be more
thoroughly treated by the standard. (The standard contains
exactly one instance of the word 'portable', in the section
describing the said:
The other issue is whether the code is standard.
In the standard I saw no concept of 'standard code', 'standard
conforming code', etc. Only 'well formed program'.
And I think (and you
seem to agree) that it isn't [necessarily] because implementations
are not required to include <ostream> into <iostream> thus making it
_possible_ to have both operator<< and std::endl _undefined_ here.
IOW, an implementation that says that the above code is ill-formed due
to the fact that operator<< and std::endl are undefined is also
a conforming one.
Yes, I agree.
My position is to make a differentiation between a conforming C++
implementation and a _strictly_ conforming implementation. But that
is probably just wishful thinking on my part...
Yes, I think it is. I just now did several searches on 14882 for
one of my replies to Rolf, and there is no concept of "strictly
conforming" described at all. Only "conforming implementation". Most
notably, there's no "conforming program" described. See my reply
for more details if interested.
I think because of all that, we should probably take "conforming"
to mean "strictly conforming", i.e. the implementation conforms
or it does not. No 'levels of conformance', 'partial conformance',
etc.
Happy new[] Years.
-Mike