Re: CppUnit: Implementation of CPPUNIT_ASSERT: bug or feature?

2017-04-27 Thread Michael Stahl
On 27.04.2017 09:42, Stephan Bergmann wrote: >> CPPUNIT_ASSERT( aBitmapEx.GetAlpha() ); > > and the condition is of type AlphaMask that has an overloaded operator ! > -- but no conversion to bool, which is probably a design bug of its own.) well it's a design bug of C++, allowing and

CppUnit: Implementation of CPPUNIT_ASSERT: bug or feature?

2017-04-27 Thread Stephan Bergmann
In include/cppunit/TestAssert.h, CPPUNIT_ASSERT is effectively defined as #define CPPUNIT_ASSERT(condition) CppUnit::Asserter::failIf(!(condition), ...) So if the expression 'condition' is such that an overloaded operator ! applies, then that will be used instead of the expected(?) built-in