Name

DEFECT_OLD_IOSTREAM_HEADERS

Affected Systems-Compilers

Systems: all

Compilers: GNU C++ 2.7, SGI MipsPro 7.1nx


Description

Many of the header files in the IOStreams library have changed names. This DEFECT macro is used for those IOStreams headers which simply dropped their ".h" extension or are contained in another traditional header file. The headers iosfwd and sstream have their own DEFECT macros since their translation from traditional C++ to Standard C++ is more complicated than this.

Work-Around

// To include the iostream header

#if defined(DEFECT_OLD_IOSTREAM_HEADERS)

#include <iostream.h>

#else // Standard C++

#include <iostream>

#endif


Approximate Filename Translations

 
Standard IOStreams Headers Traditional C++ Equivalent Comments
fstream fstream.h
iomanip iomanip.h
ios iostream.h
iosfwd [none] Use DEFECT_NO_IOSFWD_HEADER 
iostream iostream.h
istream istream.h
ostream ostream.h
sstream [none], strstream.h is similar Use DEFECT_OLD_STRINGSTREAM 
streambuf streambuf.h
strstream [deprecated] strstream.h Use sstream instead of strstream