On Sat, 2011-09-24 at 14:44 +0200, ext Stefan Majewsky wrote: > Why isn't there any variant of Q_ASSERT that expands like > > #define Q_ASSERT_ALT(x) x; > > in release builds? If it's a simple value check like Q_ASSERT_ALT(x > > 0), the compiler will optimize the effect-less statement away.
The standard assert macro in assert.h behaves the same. It does nothing as soon as you define NDEBUG. Having a Q_ASSERT_ALT macro (whatever its gonna be named) is IMHO confusing and not of much value. BR, Jörg _______________________________________________ Qt5-feedback mailing list Qt5-feedback@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback