3 ms·
That's just horrible. The readability of the function has been totally destroyed by conditional operator. What's the imaginary C++11-ish benefit?
by jsnell 15y ago
That's just horrible. The readability of the function has been totally destroyed by conditional operator. What's the imaginary C++11-ish benefit?
- alexk7 15y agoWith constexpr, if the parameters are constants, the whole computation can happen at compile-time. The line is somewhat harder to read for people not used to functional programming, but unfortunately, constexpr functions are required to have a single expression.