-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
As assert() functions does not get called in release mode by default.
Simple solution could be:
#define ASSERT(e) ((e) ? (void)0 : ((void)printf ("%s:%u: failed assertion `%s'\n", FILE, LINE, #e), abort())))
Or with throw std::runtime_error
Other options:
https://stackoverflow.com/questions/620892/how-to-put-assert-into-release-builds-in-c-c
https://www.softwariness.com/articles/assertions-in-cpp/
http://www.drdobbs.com/assertions/184403861
https://developer.apple.com/swift/blog/?id=4
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request