The History of constexpr in C++! (Part Two)

This article was translated by AI using Gemini 2.5 Pro from the original Chinese version. Minor inaccuracies may remain. Prequel: The History of constexpr in C++! (Part One) 2015-2016: Syntactic Sugar for Templates In C++, there are many templates that support full specialization, but not many that support partial specialization. In fact, only class templates and variable templates support it. Variable templates can actually be seen as syntactic sugar for class templates, so rounding it up, only class templates truly support partial specialization. The lack of partial specialization can make some code very difficult to write. ...

2024-02-22 · Updated 2024-11-30 · 8 min · 3751 words · ykiko

The History of constexpr in C++! (Part One)

This article was translated by AI using Gemini 2.5 Pro from the original Chinese version. Minor inaccuracies may remain. A few months ago, I wrote an article introducing C++ templates: Looking at Flowers in a Fog: A True Understanding of C++ Templates. ...

2024-02-10 · Updated 2024-12-18 · 9 min · 4485 words · ykiko