Clarification on #include <ostream>

Discussion in 'C++' started by Stefan Ram, Jun 14, 2011.

  1. Stefan Ram

    Stefan Ram Guest

    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?
     
    Stefan Ram, Jun 14, 2011
    #1
    1. Advertisements

  2. Stefan Ram

    Bo Persson Guest

    Stefan Ram wrote:
    > 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
     
    Bo Persson, Jun 14, 2011
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Danny Anderson
    Replies:
    5
    Views:
    787
    Victor Bazarov
    Aug 15, 2003
  2. Rolf Magnus
    Replies:
    2
    Views:
    809
    Karl Heinz Buchegger
    Nov 28, 2003
  3. Elie Nader
    Replies:
    1
    Views:
    862
  4. Rakesh
    Replies:
    2
    Views:
    429
    Kevin Goodsell
    Apr 18, 2004
  5. Rakesh
    Replies:
    7
    Views:
    392
    Kevin Goodsell
    Apr 19, 2004
  6. Andreas Bogenberger
    Replies:
    3
    Views:
    1,283
    Andreas Bogenberger
    Feb 22, 2008
  7. Replies:
    2
    Views:
    2,210
  8. , India
    Replies:
    3
    Views:
    3,517
    James Kanze
    Nov 13, 2010
Loading...