[Previous]  [Up]

Examples



Several sets of example programs are provided. The best place to start is with contents fo the directory testsuite. This contains around 250 short programs designed to illustrate the STL implementations due to ObjectSpace, Hewlett Packard and Silicon Graphics, and intended for use with Borland C++, Microsoft Visual C++ or gcc 2.7.X. All of the examples (split across subdirectories 0, 1 and 2) compile, with only minor editing (changes have been bracketed with #if(n)def ACORN_CFRONT preprocessor lines in all cases) and their output matches the expected results (except where the rand() function has been called).

The contents of the directory testbloat illustrate the impact of the template hoisting mechanism on code size by a comparison of Acorn CFront and CathLibCPP against gcc 2.7.2 and the Hewlett Packard implementation of the STL.

The two directories test and teststream contain a number of test programs that have been used during the development of the library. As such they are functional, but not always particularly transparent. One file of note is the classic "hello world" program (teststream.c++.thellow) - its footprint when linked against CathLibCPP is 15kB, compared with around 26kB when linked against the ATT implementation of the streams library that is distributed with the Acorn C/C++ product.


 [Previous]  [Up]