C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

User Documentation
Available in the NonStop Technical Library (NTL):
VERSION3: Standard C++ Library Reference ISO/IEC (VERSION3)
CAUTION: The VERSION3 documentation contains descriptions of an underlying C library
that is not the same in every case as the C library supported on HP NonStop systems. The
descriptions of those C functions might not apply to the NonStop C run-time library.
VERSION2: Standard C++ Library User Guide and Tutorial and the Standard C++ Library
Class Reference
VERSION1: AT&T C++ Reference, Release 3 or The Annotated C++ Reference Manual by
Margaret Ellis and Bjorne Stroustrup (these books are not available on NTL).
Features of the Standard C++ Library (VERSION3)
AdvantagesVERSION3 Feature
The language and library provide full compliance with the ANSI/ISO C++
Standard, with very few exceptions. ANSI/ISO compliance simplifies porting
applications to the NonStop platform.
C++ Standard Compliant
Type checking for throws and catches has been improved and is tighter than for
VERSION2. Type IDs (names beginning with __TID_) are used to match throws
Improved exception handling
and catches. The "const-ness" of the catch must match that of the throw. For
example, if "goodbye world" is thrown, the catch must expect a const char
*.
Templates are now fully supported, including templates as parameters to templates,
and explicit qualification of templates.
Template support
Beginning with G06.20, both VERSION2 and VERSION3 libraries fully support
using dynamic-link libraries (DLLs). You must use the latest libraries in a DLL
environment; VERSION1 does not support the use of DLLs.
Support for DLLs
Both IEEE_FLOAT and TANDEM_FLOAT are supported by VERSION2 and
VERSION3. All object files that make up a running process should be consistent
in the use of floating-point type. VERSION1 does not support IEEE_FLOAT.
Floating point
To ensure that the same thread is used to throw and catch an exception, Pthreads
and the C++ VERSION2 or VERSION3 run-time libraries store some state
Pthreads
information in variables in the C++ library. This functionality has been implemented
in both VERSION3 and VERSION2.
To help customers move from C++ VERSION2 to C++ VERSION3, the migration
tool generates warnings in the listing file where potential problems are found.
Migration tool
The MIGRATION_CHECK pragma is described in MIGRATION_CHECK (page 217),
and its output is described in Appendix F: MIGRATION_CHECK Messages.
Although not part of the standard, HASH_SET, HAS_MULTISET, HASH_MAP, and
HASH_MULTIMAP have been implemented in the HP NonStop C++
implementation.
Hash tables
Although not part of the standard, HP provides the features described in Using
the Neutral C++ Dialect (page 89). These features take advantage of the
Support for the neutral C++ dialect
on TNS/E systems
repackaging of C++ objects on TNS/E systems into three library files so that a
limited ability exists to create libraries that are not version dependent.
User Documentation 81