Wednesday, November 4, 2015

Digest for comp.lang.c++@googlegroups.com - 2 updates in 1 topic

Juha Nieminen <nospam@thanks.invalid>: Nov 04 09:10AM


> Like Alf said, it was technically required in C++03. I don't know of
> any implementation where it was needed, but technically, it was
> required.
 
You need both to use std::cout? I can't even figure out how you could
impose that requirement, even if you deliberately tried to do so.
Except perhaps have std::cout declared in one, and its operators
in the other.
 
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Martin Shobe <martin.shobe@yahoo.com>: Nov 04 08:15AM -0600

On 11/3/2015 3:11 AM, Juha Nieminen wrote:
>> #include <iostream>
>> #include <ostream>
 
> Isn't that second line superfluous?
 
As far as I can tell, yes. (At least in n3797).
 
From 17.6.5.2p1
 
A C++ header may include other C++ headers. A C++ header shall
provide the declarations and definitions that appear in its synopsis. A
C++ header shown in its synopsis as including other C++ headers shall
provide the declarations and definitions that appear in the synopsis of
those other headers.
 
The synopsis for iostream includes ostream. (See 27.4.1).
 
Martin Shobe
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: