Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a checked STL implementation, anything available for free?

Tags:

c++

linux

stl

  1. Have you used a checked STL implementation?
  2. Did it find bugs you were not expecting?
  3. Is there one I can try on Linux for free?
like image 413
Dan Avatar asked Apr 02 '10 17:04

Dan


3 Answers

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.

like image 106
R Samuel Klatchko Avatar answered Nov 05 '22 15:11

R Samuel Klatchko


I have not used it ever, but a quick search shows that STLPort has checked iterators in DEBUG mode.

like image 42
David Rodríguez - dribeas Avatar answered Nov 05 '22 15:11

David Rodríguez - dribeas


  1. Microsoft's VC++ implements checking.
  2. It easily catches places where iterators refer to memory out-of-bounds of the STL container to which it belongs.
  3. 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!
like image 1
themoondothshine Avatar answered Nov 05 '22 15:11

themoondothshine