C++: Using Class Templates

C++    |    Expert
  • 15 videos | 1h 52m 8s
  • Includes Assessment
  • Earns a Badge
Rating 4.0 of 7 users Rating 4.0 of 7 users (7)
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 course
    Explore class template parameters
    Create and instantiate classes with class template parameters
    Work with the braced initialization list constructor
    Use the braced initialization list constructor and let the compiler deduce template parameters
    Recognize side effects of braced initialization list constructors
    Use non-type template parameters with classes
    Illustrate the features of non-type parameters
  • Create specializations of class templates
    Use specialized templates
    Create a partial specialization to manage pointers
    Fix one out of multiple template parameters using partial specializations
    Check template type parameters using static_assert
    Define friend functions to templated classes using the introvert and extrovert patterns
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 1m 49s
  • 7m 36s
  • Locked
    3.  Creating Classes with Template Parameters
    8m 28s
  • Locked
    4.  Using the Braced Initialization List Constructor
    10m 27s
  • Locked
    5.  Automatically Deducing Class Template Parameters
    6m 45s
  • Locked
    6.  Using Functional Notation for Initializing Variables
    5m 38s
  • Locked
    7.  Using Non-type Template Parameters with Classes
    7m 49s
  • Locked
    8.  Demonstrating Features of Non-type Parameters
    7m 57s
  • Locked
    9.  Specializing Class Templates
    8m 56s
  • Locked
    10.  Using Specialized Templates
    7m 27s
  • Locked
    11.  Using Partial Specializations
    8m 16s
  • Locked
    12.  Performing Partial Specializations
    11m 16s
  • Locked
    13.  Using static_assert
    9m 40s
  • Locked
    14.  Defining Friend Functions to Templated Classes
    6m 14s
  • Locked
    15.  Course Summary
    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.

YOU MIGHT ALSO LIKE

Rating 4.2 of 5 users Rating 4.2 of 5 users (5)
Rating 4.4 of 9 users Rating 4.4 of 9 users (9)
Rating 4.6 of 7 users Rating 4.6 of 7 users (7)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.3 of 6 users Rating 4.3 of 6 users (6)
Rating 4.4 of 5 users Rating 4.4 of 5 users (5)
Rating 4.4 of 15 users Rating 4.4 of 15 users (15)