Suppose I have a custom static assert implementation (because I need to target a compiler that doesn't have static_assert
built in). I want to craft a test that checks that
MY_STATIC_ASSERT(false);
indeed asserts. If I just write such code - it will not compile (and so not run). I'd rather have some piece of code that compiles fine when the code above fails and fails to compile when the code above does compile.
Is that possible? Can I have a compile-time (or at least a runtime) check that my static assert indeed asserts for "false"?