If Statements In Modern C++
November 26, 2020
There are two kinds of if statements in modern C++: runtime if and compile-time if constexpr.
Runtime if looks like:
if (condition) statement-true
if (condition) statement-true else statement-false
In both forms of above if the result of condition yields to true, then statement-true is executed. Otherwise (in the second form of above) the statement-false is…