Assuming I'm correct and that Andrei's use cases don't make the case for static if - Is there a real case for static if.
Yes. Here's an example: template <typename Iterator> void advance(Iterator it, size_t n) { static_if(iterator_category<it>::type == random_access_category_tag) { it += n; } else { for (size_t i = 0; i < n; ++i) ++it; } } Were one to use a runtime if instead, and instantiate the function with an iterator that is not random access, one would get a compiler error of the form 'no match for operator+=(Iterator, size_t)'. The idea is that with a runtime if, the compiler type-checks the unused branch even if it ends up eliminating it in later on in the optimization phase. Regards, Nate