Comment
Comment by StephanTLavavej
Here’s what we do in MSVC’s STL:
This lets us run all test cases at both runtime and compiletime. (The static_assert performs constant evaluation, and if an assert within test_is_even would fail, it won’t be a constant expression.)