Wednesday, November 3, 2010

<iosfwd>

<iosfwd> contains forward declarations of some parts of <iostream>.

<iostream> declares the standard stream objects; <iosfwd> declares the classes in the IOStream hiearchies.

The C++2005 <iostream> header file also provides definitions of the class in the IOStream hierarchies; in C++1998 it didn't guarantee this, i.e. strictly speaking you would have needed to include <istream> and/or <ostream> as well.

References:
  Dietmar Kuhl, Personal Communication.
  Exceptional C++ by Herb Sutter. Addison-Wesley, 1999, p. 100.

No comments:

Post a Comment