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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top