4 ms·
This is not for declaring constexpr variables, it is about how to implement a checker function that verifies an inline expression is constant. Plus some of the
by lpribis 1y ago
This is not for declaring constexpr variables, it is about how to implement a checker function that verifies an inline expression is constant. Plus some of the examples work back to C99 instead of C23, which I would wager close to zero people are using in real-world code bases.
- cmptrnerd6 1y agoYou'd probably still win the wager but I do want to say there are some of us using C23. We even use it in our embedded systems running on arm based microcontrollers. Though we still do maintain some C89 code :(
- pantalaimon 1y agoC23 on embedded ARM is entirely painless as it’s all upstream GCC these days anyway. The problem is if you want to also still support esp8266 which is forever stuck at GCC 8.4
- Y_Y 1y ago#define C(x) ((constexpr typeof(x)){ (x) })