
FAQ "fix" seems very weak
Quote:
>The STL files supplied with Visual C++ 5.0 show a copyright of 1995... so
>we are not dealing with a hot-off-the-press package here. The particular
>problem I originally noted is very fundamental and can crop up in numerous
>situations. The bug is in _Copy, which is used by _Grow, which is used by
>append, assign, insert, erase, replace, reserve, and _Freeze, which in turn
>are used by... identifying all the specific cases which will activate this
>bug would be difficult (but admittedly not insurmountable). The point is
>there *may* be many. Many user must have stumbled across this problem in
>the past several years and I am interested in knowing what action was
>taken. I have thought of the following cases:
> 1) Everyone knows there is a more recent P.J. Plauger STL implementation.
>It is at ?????
> 2) Use a different STL implementation with Visual C++ 5.0
> 3) Fix the root problem in the Visual C++ 5.0 supplied implementation
> 4) Add workarounds in user code on a case by case basis
> 5) Don't use STL with Visual C++ 5.0
> 6) This is a none-issue, I've made a mountain out of a mole hill, stop
>whining
> Actually I am extremelly new to STL (one week) and am trying to figure out
>how to proceed. I would appreciate any user's guidance.
>John Keenan
First I would like to point out that the std::string class is NOT part of
STL. STL (Standard Template Library) consists of the containers, iterators,
and algorithms such as vector<>, map<>, set<>, lower_bound(), sort(),
find(), etc. std::string came before STL, but has been modified to look
similar to the STL containers.
The reason why this distinction is important to the thread is that looking
for another STL implementation (such as SGI's) will not help solve the
problem John Keenan is talking about. std::string is not supplied in SGI's
STL implementation.
I have used a version of SGI's STL implementation at home, and I must say
that it is pretty nice. Although one doesn't typically read library source
code, when the need arises the SGI code is--gasp--readable. Compared to the
source that MS ships with VC++ there is no contest. Also, SGI has paid more
attention to exception and thread safety.
The version I use can be found at: http://www.sirius.com/~ouchida/
It's not the most recent version, but it is the easiest to use with VC++.
John, could you elaborate on the bug fix that you made in xstring.h, I'm
considering implementing it here.
Thanks,
Chris Hines
The sooner you start coding, the longer it will take you to finish.