From 00590e7bcd89471472874ccd7feb77600cd49ed9 Mon Sep 17 00:00:00 2001 From: griitch <73233801+griitch@users.noreply.github.com> Date: Sun, 7 Feb 2021 00:44:44 +0100 Subject: [PATCH] added static_assert --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 481ab84..5b17ca7 100644 --- a/README.md +++ b/README.md @@ -360,8 +360,10 @@ fabs(x); fmod(x, y); // Absolute value, x mod y ```cpp #include // Include iostream (std namespace) -assert(e); // If e is false, print message and abort +assert(e); // checks if e is false at runtime, print message and abort +static_assert(e) // checks if e is false at compile time, gives a compilation error if false #define NDEBUG // (before #include ), turn off assert + ``` ## `iostream.h`, `iostream` (Replaces `stdio.h`)