The Standard Template Library [Lee-Step],
[SGI-STL], had the reputation of being complex and hard to
use. Because of its exhaustive use of the new
C++ language features, most compilers weren't able to fully support
this library. Nowadays, new compilers and the standardisation of
C++ [ANSI-CPP] not only enable us to use the STL in its
full strength, but also show us the drawbacks of a library which
apparently was designed from scratch without the possibility of testing and
using it.
This paper will focus on the syntax and semantics of
STL Adaptors and Binders. It will reveal some shortcomings in their C++
implementation and suggest solutions for the encountered problems.
...
Postscript Version (103kb),
gziped Postscript Version (46kb),
Online Version
(Notice: These links refer to the same version of
the article which was published in the January 2000 issue of
"ACM SIGPLAN Notices")
Some of the source code presented in the paper can be downloaded here though
it may not be of usefull in general. I primary used it to test the techniques
described in the paper. The file
adapter_binder.cpp
contains the specialized version of binder2nd while
ptr_fun.cpp contains the
specializations of binary_function.
"adapter_binder.cpp" is known to work with egcs 1.03, egcs 1.1 and gcc 2.95.2
(not with 2.95) while "ptr_fun.cpp" seems to work with any egcs/gcc release
not older then egcs 1.1. Both files have also been compiled and tested with
the 2.43 version of the EDG front end
together with a release of the new
SGI standard
C++ library.
|
|