nemequ/portable-snippets

Check module clarification

travisdowns opened this issue · 1 comments

Maybe I am being pedantic, but in the documentation for the check module it says (bolding mine):

Additionally, unless you define PSNIP_CHECK_FAIL_DEFINED, a failing assertion will considered undefined behavior even when NDEBUG is defined.

The "even" there seems wrong to me - I think it is saying "a failing assertion is UB even when NDEBUG is defined [and obviously also in the case it is not]", the part in brackets being implied by the "even"?

However a failing assertion should not be UB when NDEBUG is not defined, it should do the well-defined assert thing of aborting the program with a diagnostic.

If you agree, I think just removing the word even fixes it entirely.

Maybe I am being pedantic

You say that like it's a bad thing… I'm all for correctness, and you're right that the "even" is wrong.

5338ca6 should fix the problem. Thanks for pointing it out, and please don't hesitate to let me know if you notice stuff like this in the future!