C++: Using Class Templates
C++
| Expert
- 15 videos | 1h 52m 8s
- Includes Assessment
- Earns a Badge
Class templates are a way of reusing code for classes parameterized by types of internal state variables, just as function templates are a way of reusing code for functions parameterized by the types of input arguments and return types. In this course you will discover how to define and instantiate class templates, along with common uses of templated classes. Learn how to use the braced initialization list constructor and explore how the compiler provides this special construct so that container objects can be initialized from a list of values. Finally, investigate partial and full template specializations, and how partial specializations can be used to correctly deal with pointer types.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseExplore class template parametersCreate and instantiate classes with class template parametersWork with the braced initialization list constructorUse the braced initialization list constructor and let the compiler deduce template parametersRecognize side effects of braced initialization list constructorsUse non-type template parameters with classesIllustrate the features of non-type parameters
-
Create specializations of class templatesUse specialized templatesCreate a partial specialization to manage pointersFix one out of multiple template parameters using partial specializationsCheck template type parameters using static_assertDefine friend functions to templated classes using the introvert and extrovert patternsSummarize the key concepts covered in this course
IN THIS COURSE
-
1m 49s
-
7m 36s
-
8m 28s
-
10m 27s
-
6m 45s
-
5m 38s
-
7m 49s
-
7m 57s
-
8m 56s
-
7m 27s
-
8m 16s
-
11m 16s
-
9m 40s
-
6m 14s
-
3m 50s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.