
上QQ阅读APP看书,第一时间看更新
Simplifying compile time decisions with constexpr-if
In templated code, it is often necessary to do certain things differently, depending on the type the template is specialized for. C++17 comes with constexpr-if expressions, which simplify the code in such situations a lot.