My point is that it's a redundant check. Whether it is there or not, the result is the same--the program will halt. Maybe the error message form enforce will look nicer, but that's about it.
Brad Roberts Wrote: > Bartosz Milewski wrote: > > Of course, enforce(mdgt); is there only for documentation purposes. > > Just like null dereference, it halts the program, right? > > What sort of documentation do you have that's able to stop a program in > it's tracks? :) > > Yes, it's not a compile time check, it's a run time check. It's > different from assert() in that it still happens even in release builds. > > Later, > Brad