Unlisted Videos All Videos All Videos Submit Video



Back to Basics: Templates (part 2 of 2) - Bob Steagall - CppCon 2021








Uploaded to YouTube by: CppCon
Date submitted to Unlisted Videos: 20 February 2024
Date uploaded/published to YouTube: 26 December 2021

Tags:




Description:

Part 1: https://youtu.be/q2gDZgp8B9o
https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Generic programming is powerful idiom for building reusable software components whose behavior can be tailored (parametrized) at compile time. The C++ language supports generic programming with templates, which are at the heart of the Standard C++ Library and the basis of many popular libraries like Eigen, JUCE, POCO C++, and Boost.

This two-part series begins with a brief overview of generic programming and why it is so important and useful in modern C++. We'll look at how C++ templates support generic programming, and provide some examples of the kinds of templates most likely to be encountered: function templates, class templates, alias templates, and variable templates. We'll then provide some practical tips for using templates, debugging template code, and structuring code that contains your own templates.

After that, we'll define and discuss the most important aspects of templates, such as parameters and arguments, substitution and instantiation, specialization, qualification, two-phase translation, non-type parameters, the one-definition rule, linkage, and more. Finally, we'll take a look at some slightly more advanced topics like variadic templates, type traits, tag dispatch, and the new lambda template feature in C++20.

These sessions are for C++ programmers seeking a tutorial or refresher on template fundamentals. If you've avoided templates in the past, or felt a little intimidated by them, or want to gain a better understanding of how templates work and how to use them on a daily basis, then this series is for you. Attendees will leave with a basic understanding of what C++ templates are, how they support perform generic programming, the most common kinds of C++ templates and their uses, the fundamental concepts underlying templates, important template terminology, and how to use and write basic templates in everyday code.

---
Bob Steagall
Program Chair, KEWB Computing

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

Register Now For CppCon 2022: https://cppcon.org/registration/