Name
DEFECT_OLD_STL_HEADERS
Affected Systems-Compilers
Systems: all
Compilers: GNU C++ 2.7, SGI MipsPro 7.1nx
Description
Standard C++ uses different filenames for the Standard Template Library
headers. In fact, the STL that is freely available from SGI still uses
the traditional C++ header filesnames. Unfortunately, the filename relationships
are not exactly a one-to-one mapping, so the programmer must test each
variant to be sure the correct definitions are seen by the compiler.
Work-Around
// To include STL's stack and queue class declarations
#if defined(DEFECT_OLD_STL_HEADERS)
#include <stack.h> // Traditional STL defines stack and queue here
#else // Standard C++
#include <stack>
#include <queue>
#endif
Approximate Filename Translations for STL Headers
| C++ Standard Containers |
HP STL / SGI STL Equivalent |
Comments |
| algorithm |
algo.h, algobase.h |
|
| deque |
deque.h |
|
| functional |
function.h |
|
| iterator |
iterator.h |
|
| list |
list.h |
|
| map |
map.h |
|
| memory |
defalloc.h |
|
| numeric |
algo.h, algobase.h |
|
| queue |
stack.h |
|
| set |
set.h |
|
| stack |
stack.h |
|
| utility |
function.h, pair.h |
|
| vector |
vector.h |
|