3 ms·
Well, since they seem to be including collections of elements, each with dependency on one or two files, SaferCPlusPlus[1] could be added to the "data structure
by duneroadrunner 10y ago
Well, since they seem to be including collections of elements, each with dependency on one or two files, SaferCPlusPlus[1] could be added to the "data structures" category. It's a collection of safe compatible substitutes for C/C++'s unsafe elements that's generally intended to be used as a whole, but certainly supports cherry picking of individual elements. For example, you could choose to use its safe substitutes for std::vector (and std::array) while foregoing its safe pointer substitutes.
The implementation design was a trade-off between minimizing redundancy and minimizing dependencies (and inter-dependencies). Ultimately I decided minimal dependencies would be more appealing to the user.
[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus https://github.com/duneroadrunner/SaferCPlusPlus
- zielmicha 10y agoThere is also _GLIBCXX_DEBUG - if you have defined this symbol, glibc will use safer variant of std::vector, iterators etc, which asserts when you attempt to do bad things like reading out of range.
- duneroadrunner 10y agoYup. SaferCPlusPlus has vector and array substitutes that will also catch "use-after-free" bugs and use of invalid iterators. Clang/LLVM and gcc also provide "sanitizers" with much more comprehensive checking. But there are still situations when you'd want to use SaferCPlusPlus [1]. [1] https://github.com/duneroadrunner/SaferCPlusPlus#safercplusplus-versus-clangllvm-sanitizers https://github.com/duneroadrunner/SaferCPlusPlus#safercplusp...