This is an experimental snapshot of SGI's standard C++ library. You should download it if you are interested in contributing to an ongoing development effort, but not (yet) if you are looking for a library implementation that is guaranteed to work "out of the box".
This snapshot includes the entire standard C++ library: STL, iostream/locale, and numerics (valarray and complex). It does not include a standard C library implementation; it is intended to interoperate with an existing C library.
Please note that some aspects of an I/O library are inherently platform-specific. (See below for more details.) This library has been tested on IRIX 6.x using the SGI MIPSpro 7.3 compiler, and on Linux, using glibc 2.0 and the egcs 1.1.2 compilers. It passes simple tests on Microsoft Windows NT using the Microsoft Visual C++ 6.0 compiler (with Service Pack 3). Compiling it on other platforms will almost certainly require at least some work. Porting to another version of Unix, using a relatively recent C++ compiler, should not be difficult.
We welcome suggestions, patches, and bug fixes. Please send comments to email@example.com.
g++ -I. -D__STL_USE_NEW_IOSTREAMS -g hello.cxx libCio.aAlternatively, you can edit the stl_config.h header so that the macro __STL_USE_NEW_IOSTREAMS gets defined automatically.
This iostream/locale library is intended to coexist with a preexisting C library. It assumes that for any C library implementation there is some way---just not a portable way---to get at the underlying data files so that we can have multiple active locales. We defined an interface, found in in c_locale.h, for this functionality. Our C++ I/O library requires some implementation for the c_locale.h interface. We believe that implementing the c_locale.h interface is the major work involved in porting the I/O library to a new platform.
We have implemented the c_locale interface for the IRIX C library (it is not included here because it includes code that, for legal reasons, SGI can't release as open source), and for the GNU glibc 2.x library.
Additionally, we provide a stub implementation of the c_locale interface. This interface is used only for named locales that the OS knows about, such as (in IRIX) "de", "es_MX", and "fr_BE". It isn't used for user-defined locales, or for the classic locale. So the stub implementation takes any string, and returns a failure indication when the user attempts to create a named locale. That's perfectly conforming, according to the C++ standard, and it's even useful. (At least for people who don't have a pressing need for internationalization.) This can serve as a stopgap for platforms where we don't yet have a real c_locale implementation.
We have tried to abstract out as much system-dependent stuff as possible into the _Filebuf_base class. At present it supports IRIX and Linux; porting to other versions of Unix should be easy. There is also some incomplete support for NT; issues there include the '\n' <-> CRLF translation in text mode, and the use of native Win32 system calls, especially for memory mapped I/O.
(An aside: the C++ standard does not say what type of streambuf is used by the standard streams, cin, cout, cerr, etc. Our choice: the wide streams, and in unsynchronized mode the narrow streams as well, use basic_filebuf. In synchronized mode the narrow streams instead use SGI::stdio_istreambuf or SGI::stdio_ostreambuf. Those classes are defined in the header <stdio_streambuf>, and, of course, they are extensions.)
|May 5, 2000||stdlib_20000505.tar.gz
|Changed deque to remove the extension of a third, default template parameter by which the user can control the node size. The extension does not appear to be standard-conforming.|
|April 18, 2000||stdlib_20000418.tar.gz
|Changed basic_istream::seekg and basic_ostream::seekp so that they conform to the resolution to library issue 136 adopted in Tokyo. (seekg should set only the get pointer, and seekp should set only get put pointer.) Fixed a bug that affects string output when the width is nonzero; thanks to Volker H. Simonis for a bug report and patch. Changed bitset to remove the extension of a second template parameter. The extension does not appear to be standard-conforming (see library issue 94), and it isn't very useful anyway.|
|April 14, 2000||stdlib_20000414.tar.gz
|Small bug fixes. Thanks to Alain Miniussi for patches to satisfy compiler that perform certain strict error checks, and to Boris Fomitchev for a Sun compatibility patch.|
|April 3, 2000||stdlib_20000403.tar.gz
|Numeric I/O bug fixes. Thanks to Dave Abrahams for a hex input patch.|
|March 28, 2000||stdlib_20000328.tar.gz
|Various bug fixes. Thanks to Kevin Shepherd for Sun and Win32 patches, and Dan Tsafrir for a g++ 2.91 patch.|
|March 21, 2000||stdlib_20000321.tar.gz
|Various bug fixes, including workarounds for Microsoft C++ 5.0 limitations. Thanks to Jan Mikkelsen for changes for Intel C++ compatibility patches, and Jochen Schlick for UnixWare 7 compatibility patches.|
|February 18, 2000||stdlib_20000218.tar.gz
|Fixed another native Win32 API problem; thanks again to Kevin Shepherd. Algorithmic improvement to make list<>::reverse() smaller and faster; thanks to John D. Valois.|
|January 28, 2000||stdlib_20000128.tar.gz
|Fixed a memory leak in basic_filebuf. Fixed another native Win32 API problem; thanks again to Kevin Shepherd and Boris Fomitchev.|
|January 25, 2000||stdlib_20000125.tar.gz
|Bug fixes. Thanks to Kevin Shepherd and Boris Fomitchev for patches that fix a Win32 initialization problem.|
|January 10, 2000||stdlib_20000110.tar.gz
|The Win32 version of this library now uses the native Win32 API, rather than Unix emulation. Thanks to Kevin Shepherd for the patch to support native Win32 calls.|
|January 7, 2000||stdlib_20000107.tar.gz
|More bug fixes and compatibility improvements. Thanks to Jan Mikkelsen for an Intel C++ compatibility patch.|
|December 28, 1999||stdlib_19991228.tar.gz
|Minor bug fixes. Thanks to Vadim Egorov for a time facets patch.|
|December 15, 1999||stdlib_19991215.tar.gz
|Changes for Microsoft compatibility. Library now passes more complete test suite using Visual C++ 6.0 SP3.|
|December 10, 1999||stdlib_19991210.tar.gz
|More small bug fixes.|
|November 23, 1999||stdlib_19991123.tar.gz
|Minor bug fixes and performance improvements. Makefile is now provided for Microsoft C++ and for IRIX.|
|October 14, 1999||stdlib_19991014.tar.gz
|Library now compiles and passes simple tests using Microsoft Visual C++ 6.0 (with Service Pack 3).|
|September 5, 1999||stdlib_19990905.tar.gz
|Library now includes support for class complex.|
|August 30, 1999||stdlib_19990830.tar.gz
Copyright © 1999
Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.