Is “if constexpr” useful outside of templates?
问题 I'm trying to understand if constexpr fully. I understand, that if if constexpr(expr) used in a template, and expr is dependent on a template parameter, then during instantiation, only one of the then / else branches will be instantiated, the other will be discarded. I've got two questions: Is it true, that if expr is not dependent on a template parameter, then no branches of if constexpr(expr) will be discarded? If yes, where does the standard say so? I don't see where the standard has the