On Thursday 27 Nov 2003 6:05 pm, Daniel Silverstone wrote:
On Thu, 2003-11-27 at 17:51, Paul wrote:
assert is a debugging macro that shouldn't be left in production code - It produces error messages that worry and/or confuse the end users. Either add the line: #include <cassert> to each file affected, or compile with NDEBUG defined.
Having asserts in production code is actually very useful. It means that if your testing isn't thorough enough, you can get some useful information out of a crash in production.
D.
IIRC gtk+ uses assertion all the time in its production code, particualrly to check variables are valid and they are an excellent debugging tool for anyone using gtk+.
Ian