Josuttis’s books are normally pretty good, lots of examples and a clear explanation of why you might want to use something, but oof that looks akin to a kick in the essentials.
Even if you’ve no other reason to update to C++20, the fact that if constexpr gets rid of half the things you’d previously need to use SFINAE for, and concepts gets rid of the other half, makes it well worthwhile. Amazing how much it stops hurting when you stop doing ridiculous things.
Valmond@lemmy.dbzer0.com 1 day ago
Amateurs!
Image
swab148@lemmy.dbzer0.com 20 hours ago
Big guy with a club:
Image
SubArcticTundra@lemmy.ml 16 hours ago
Ah, the illusive
SlurpingPus@lemmy.world 20 hours ago
I see someone finally embraced the fact that C++ templates are Turing-complete and you don’t really need much of the rest.
Valmond@lemmy.dbzer0.com 20 hours ago
Some people thought too much if they could, and not enough if they should.
/j 😁
addie@feddit.uk 1 day ago
Josuttis’s books are normally pretty good, lots of examples and a clear explanation of why you might want to use something, but oof that looks akin to a kick in the essentials.
Even if you’ve no other reason to update to C++20, the fact that
if constexprgets rid of half the things you’d previously need to use SFINAE for, and concepts gets rid of the other half, makes it well worthwhile. Amazing how much it stops hurting when you stop doing ridiculous things.Valmond@lemmy.dbzer0.com 23 hours ago
I had to learn and do template metaprogramming on gcc 4.8 😭😭😭
SubArcticTundra@lemmy.ml 16 hours ago
That book looks as old as the language itself
Valmond@lemmy.dbzer0.com 3 hours ago
Template metaprogramming (with the variadic function) is like from the late seventies IIRC… Older than C++!
Well, people might argue about the definition but the idea has been around some fair time …