- C++17 STL Cookbook
- Jacek Galowicz
- 41字
- 2025-04-04 19:00:06
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.