Using a checked STL implementation, anything available for free?
The GNU implementation of the standard C++ library that comes with GCC has checked STL. Just add -D_GLIBCXX_DEBUG
to your command line.
Yes, I've used it. I can't say for sure if it's caught bugs but it gives me more confidence that certain classes of bugs aren't being missed.
Because of performance overhead, we only use checked STL for debug builds.
- Microsoft's VC++ implements checking.
- It easily catches places where iterators refer to memory out-of-bounds of the STL container to which it belongs.
- I'm not sure, but I think you should try the Boost C++ library. It has myriad variety of features including concept checking, etc. Heck, its become the basis for the C++0x standard!