checkedint call removal

KoKuToru via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 30 11:38:12 PDT 2014


On Wednesday, 30 July 2014 at 18:18:24 UTC, Wyatt wrote:
Incidentally, this conversation actually forced
> me to look into the semantics of assert() in C and C++, and it 
> turns out it's moderately muddy, but it seems they're only 
> eliminated if you #define NDEBUG?
Building CMake-Projects with DCMAKE_BUILD_TYPE=Release,
will set -DNDEBUG and therefore disable asserts.

As C++ programmer, I can't understand how somebody would want to
have assert in his release-build.

"Therefore, this macro is designed to capture programming errors,
not user or run-time errors, since it is generally disabled after
a program exits its debugging phase."
http://www.cplusplus.com/reference/cassert/assert/


More information about the Digitalmars-d mailing list