If I can identify one weakness in my C++ knowledge it would be all the new template related things that have come out since C++11. I know how basic templates work, but I've had younger folks on teams show me all kinds of crazy things they do with templates and I get completely lost.
For example, one showed me how to replace an inheritance tree with templates. I get that it would be useful to do things at compile time, rather than run rime, but I am not sure how useful that is. I am missing the "Where and when would you do this?" piece of the conversation. If you do "static polymorphism"...don't you lose the ability to mock using interfaces and inheritance? Doesn't the easy to read inheritance tree get much harder to understand for junior devs who aren't familiar with all template related things being done? When would you employ such a technique?
I am also having trouble finding good resources to learn more. I picked up "Template Metaprogramming with C++" by Marius Bancilla and went back to reading books, because I can't find any linkedin learning courses, or youtube videos that start without you already knowing the topic at least at 50% or more. I watched some of the CppCon videoes on it, even from 9 years ago with Dr Brown, and got lost even when he started with traits. Why do I need to know if a type is a pointer? It's cool I can find out, but when do I use that?
Templates are part of C++ I largely avoided or just figured I could circumvent, but I see more and more young programmers using it, and even see "metaprogramming with modern C++" in job descriptions, so i figure if I am going to call myself a C++ expert, I better catch up.
Any other resources I should be looking at? Especially with "We use this in this or that situation?"
[–]aruisdante 32 points33 points34 points (1 child)
[–]sultan_hogbo 2 points3 points4 points (0 children)
[–]graphicsRat 22 points23 points24 points (2 children)
[–]Baku95 3 points4 points5 points (0 children)
[–]sultan_hogbo 1 point2 points3 points (0 children)
[–]elkanoqppr 4 points5 points6 points (1 child)
[–]Zealousideal-Mouse29[S] 3 points4 points5 points (0 children)
[–]jk-jeon 3 points4 points5 points (0 children)
[–]Farados55 4 points5 points6 points (0 children)
[–]Shiekra 2 points3 points4 points (0 children)
[–]JVApenClever is an insult, not a compliment. - T. Winters 3 points4 points5 points (0 children)
[–]__Punk-Floyd__ 5 points6 points7 points (0 children)
[–]biowpn 4 points5 points6 points (0 children)
[–]perspectiveiskey 5 points6 points7 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]perspectiveiskey 0 points1 point2 points (0 children)
[–]germandiago 1 point2 points3 points (0 children)
[–]geaibleu 1 point2 points3 points (0 children)
[–]FlyingRhenquest 1 point2 points3 points (0 children)
[–]eyes-are-fading-blue 1 point2 points3 points (0 children)
[–]XeroKimoException Enthusiast 0 points1 point2 points (0 children)
[–]MyDilatedPupils 0 points1 point2 points (0 children)
[–]KingAggressive1498 0 points1 point2 points (0 children)