Back to Basics: Function and Class Templates - Dan Saks - CppCon 2019

preview_player
Показать описание



Generic programming is a collection of techniques for implementing software components that you can adapt easily for a variety of uses. In C++, templates are the primary tool for generic programming, and they're used throughout the standard library. Templates can be functions or classes, as well as variables or type aliases.

This session is for C++ programmers who would like to shore up their understanding of templates. It describes many C++ template features and offers insights into how compilers use compile-time information, such as types and values, to process templates.

This session begins by showing how to define function templates and how call them using explicitly-specified or deduced template arguments. It then covers class templates, including the behavior of static data members, friends, and nested classes appearing in class templates. It explains why template definitions require explicit qualification or the keyword typename in some situations. It presents the different forms of template parameters and corresponding arguments, as well as default arguments. Throughout, it clears up common misunderstandings regarding templates, such as the differences among the mechanisms of instantiation and the different flavors of specialization.

Dan Saks
Saks & Associates
President


*-----*
Рекомендации по теме
Комментарии
Автор

Back to Basics is the best learning material for C++ that I found on the YouTube.

kamilziemian
Автор

He is an excellent teacher, each slide is explained concisely and clearly and he gives you time for the point to sink

MarcusAseth
Автор

This presentation from Dan Saks, is the best intro to Templates. Thanks a lot.

parthx
Автор

Excellent presenter. Clearly has a deep understanding of the subject and conveys the knowledge really well. Shall look out for more of his presentations.

keithrobinson
Автор

Fantastic talk! Was able to not only teach one topic very clearly, but also touch on other topics of C++ programming without confusing and distracting the audience.

yasamanderiszadeh
Автор

Watching c++ videos makes me appreciate how well TCL in particular uses brackets so nicely, there's no confusion about which relates to what, without overlapping meaning...

powkung
Автор

47:31 It is a simple fact about why we need "typename". His way of explanation is very enlightening. I wish I could see it earlier.

芝士蛋挞-cz
Автор

Just few minutes and I am so much confident that he is a proficient teacher .. thanks for sharing your wisdom 🙏

hpandeymail
Автор

i love it, one is really rewarded for concentrated listening here because he grasps it so well in "each sentence"

nicolasjochem
Автор

One of the best talks I've heard on templates! Very concisely explained

yashtrikannad
Автор

Great presentation, and in general the whole series are very helpful

LogenVonSchlenz
Автор

Nice talk, well explained, thank you. Thank you also CppCon for providing these great videos, much appreciated!

gregwoolley
Автор

Excellent, I am his fan since 2001 when I started reading his articles in ESP magazine.

kulakulagundi
Автор

This is really good. There are a lot of talks and blogs, etc. etc. about templates which would be great if you have already watched this one and learned everything in it, but are terrible icy lakes to jump into from scratch.

jvsnyc
Автор

Excellent presentation on templates, I learned a lot!

chrisshyi
Автор

These lectures are invaluable. Nice presentation.

ian
Автор

Excellent teacher and clear explanation thanks!

oxioxp
Автор

It's really good explanation. Covered all basic aspects! Thanks!

nukemate
Автор

Very good presentation on template basics. I liked how typename is introduced part and the specialization materials. I found most tutorials will skip these basics.

perfumedsea
Автор

Very clear explanation of a tricky feature.

anthonyrocha