think-cell / think-cell-library

think-cell core library
https://www.think-cell.com/en/career/devblog/overview
Boost Software License 1.0
407 stars 52 forks source link

mock up undefined macros #12

Closed frederich closed 8 years ago

treh commented 8 years ago

Why did you implement _ASSERTPRINT this way? The mock up should be an empty macro.

frederich commented 8 years ago

You are right, it's not correct.

Yes, a noop is one way for the mock-up, but why complete remove the check, just assert it. That was my idea. Then it should be #define _ASSERTPRINT(...) _ASSERT(__VA_ARGS__)).

My understanding of _ASSERTPRINT is that it checks the expression with an assert and prints an error message when the assert fires.