Šimon Tóth’s Post

View profile for Šimon Tóth

C++ Educational Content Creator | 20 years of Software Engineering experience distilled into digestible daily posts

Deduction guides are rules that instruct Class Template Argument Deduction (CTAD). The compiler automatically generates guides that map each constructor call argument to a template parameter. However, we can also provide custom guides to modify the default behaviour or trigger CTAD even when the constructor arguments don’t directly map to template parameters. Compiler Explorer link: https://lnkd.in/ebjYPUNF #cpp #cplusplus #coding #programming #dailybiteofcpp

  • text

Coming from experience in C++98/03 code base, the modern C++ language feels so alien and complicated. So I really appreciate what you are doing with this series of posts, I'm getting a hang of some of the concepts (barely on surface level), your posts are demystifying some of the things I'm scared to even broach about the modern C++. I still struggle to see where, in a practical code base, concepts such as this are used? I mean, really, in a live project, what is the general use case for using this concept? My lack of understanding might be coming from less experience in template programming (which in itself is intimidating and confusing). Is there any 'mental model' / line of thinking a programmer needs to have when thinking about template programming and using all the related concepts that the language provides that help in making template programming work? It all seems so complicated and daunting. What "problem statements" do you suggest one can practice solving where these sorts of concepts can be used naturally to fulfil the goal? Thanks again for putting out these useful snippets of the modern language! As I said, these concepts seem daunting to me but your posts are sparking that itch to learn them and understand them.:)

Like
Reply
José S.

TOTVS260 followers

1y

I didn't even know that this existed ...

See more comments

To view or add a comment, sign in

Explore content categories