https://bugs.kde.org/show_bug.cgi?id=408539
--- Comment #6 from Christoph Cullmann <cullm...@kde.org> --- The assert is there that I/we get a nicer kind of failure in a debug build if one ever breaks that invariant during development and to document the intend. Why should I remove that? If I remove it and break stuff during development, I will need to read a backtrace and figure out the failure. With the assert I get a verbose error message and have the knowledge that it is not wanted to ever arrive with an invalid iterator here. And for the release builds, it produces zero code, the user will not be burdened with unneeded run-time checks. Actually, below in your backtrace, I don't see how you tripped over the assert, you did run in the release build crash. That won't change if I remove the assert now and the invariant is broken again, we just get a worse developer experience for debug compiles. Perhaps you use assertions for other things, I use them in most cases for the stuff you read for example here https://en.wikipedia.org/wiki/Assertion_(software_development) * Assertions during the development cycle I would be happy if that assertion could be proven during compile time as some static assertion, but static analysis will not do that for you with reasonable effort. That would actually be the nicest kind of assert there: no compile if we break this logic. -- You are receiving this mail because: You are watching all bug changes.