Clarification on #include <ostream>

S

Stefan Ram

The C++ standard from the 90s said that »#include <ostream>«
was required to use »<<« as in »::std::cout << 0«.

But since no implementation required this, it was often said
to be a defect in the standard.

Has this requirement been removed from the standard in the
meantime?
 
B

Bo Persson

Stefan said:
The C++ standard from the 90s said that »#include <ostream>«
was required to use »<<« as in »::std::cout << 0«.

But since no implementation required this, it was often said
to be a defect in the standard.

Has this requirement been removed from the standard in the
meantime?

Yes, the new standard (C++11) requires <iostream> to include <istream>
and <ostream>.



Bo Persson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,081
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top