Is assert(false) ignored in release mode?
I am using VC++. Is assert(false) ignored in release mode? activout.se If compiling in release mode includes defining NDEBUG, then yes. See assert (CRT) IIRC, assert(x) is a macro that evaluates to nothing when NDEBUG is defined, which is the standard for Release builds in Visual Studio. The assert macro (at least it is typically a macro) is usually defined to no-op in release code. It will only trigger in debug code. Having said that. I have worked at places which defined their own assert macro, and it triggered in both debug and release mode. I was taught to use asserts for condition which