What about using `if constexpr`? Sure, there currently are no equivalent constant variables to use, but adding those should be very easy.
That being said, if constexpr is great; iterating over either sparse or dense arrays with in Blaze without wrapping in two functions was mind-blowing when I discovered I could so easily.