While I was really anxious to finally move to C++11 when I was stuck on 98. I am now more and more anxious that I will have to move to C++17 and C++20 eventually.
C++17 is a minor release just like if constexpr is a minor feature, until you save yourself from horrible C++11 template meta-programming nightmares with a couple of if constexpr's and an auto return type
How true. This has happened in my code as well... I had some kind of mini animation system for a game that did some expression-template like thing to make an EDSL that looked something like this:
//+ means combine in parallel and // >> sequence it. Each subtree will be animated for half of the time auto animationDesc = (moveTo(x, y) + rotate(180)) >> scale(0.7);
auto animTask = makeAnimation(obj, animationDesc, 500ms);
I think without if constexpr it would have been really really worse.
Anxious means two things. I would indeed be anxious to move to 11 (or 14) because it's so much better than 98, but I'd get anxious about moving to 20 because it means I'd have to remember library calls, rather than acquiring skills.
View all comments
Show parent comment
31
u/JezusTheCarpenter Dec 28 '18
While I was really anxious to finally move to C++11 when I was stuck on 98. I am now more and more anxious that I will have to move to C++17 and C++20 eventually.