filmov
tv
Back to Basics: Function and Class Templates - Dan Saks - CppCon 2019
Показать описание
—
—
—
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
—
*-----*
—
—
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
—
*-----*
Комментарии