How to make exceptions for STL instead of statements?

I need to write tests for poorly written C ++ code. The problem is that the code causes STL / debug breaks statements in many situations (usually caused by dumb errors, such as accessing outside the line / vector), which leads to the completion of the tests.

Is it possible to eliminate STL exceptions (which can be caught) instead of just crashing?

I need to make changes to the source code to an absolute minimum.

thanks for the help

+5
source share
1 answer

It definitely depends on which STL you are using. However, this may just be impossible.

( ++ 0x ) . std::vector<T>::operator[] .

( , STL, ), .

. , Linux Valgrind. , .

+3

All Articles