13 Aug
2008
13 Aug
'08
2 p.m.
Johan Nilsson wrote:
Daniel Krügler wrote: [..]
The only reasonable solution is to fix the test. According to standard C++ the expression "a->f()" using an a with a null pointer value causes undefined behaviour. Why don't you use a valid argument? Possible examples are:
I believe the above is just an example. Under Windows, the dereferencing of the null pointer leads to an access violation which can be handled via SEH (Structured Exception Handling). MSVC provides a way to translate strutured exceptions to C++ exceptions, which Boost.Test is supposed to use.
Thanks for clarification. I was aware of the compiler-specific (and OS-supported) behavior, but not of the extended support of Boost.Test. - Daniel