Given the discussion in #15, I think there is an appetite for a HEDLEY_ASSUME macro instead of just relying on HEDLEY_UNREACHABLE. Several compilers support a variant of assume (at least MSVC, clang, and TI. Probably ICC, too).
GCC is the big holdout, but I think something like (untested) this would work:
Given the discussion in #15, I think there is an appetite for a
HEDLEY_ASSUME
macro instead of just relying onHEDLEY_UNREACHABLE
. Several compilers support a variant of assume (at least MSVC, clang, and TI. Probably ICC, too).GCC is the big holdout, but I think something like (untested) this would work:
That would let us do this without relying on an if block.