Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Beginning C++ Templates
Rating: 4.5 out of 5(1,199 ratings)
39,705 students

Beginning C++ Templates

Understand templates in depth & create generic algorithms and classes.
Created byUmar Lone
Last updated 2/2021
English

What you'll learn

  • Understand the syntax of function templates & classes
  • Understand the inner working of templates
  • Understand & implement generic algorithms and classes

Course content

2 sections17 lectures1h 17m total length
  • Introduction0:50
  • Prerequisites0:21
  • Source Code0:02

    Source code of examples used in the lectures.

  • Introduction to Templates7:48

    Introduces generic programming. Also shows the basic syntax of templates that will get you started with writing your own function templates.

  • Assignment I0:11
  • Template Argument Deduction & Instantiation6:27

    Explains how 

    1. template arguments are deduced by the compiler
    2. compiler instantiates function template for specific types
  • Explicit Specialization5:54

    Learn how to customize function templates for a specific type when the function algorithm is unsuitable for that type.

  • Non-type Template Arguments7:14

    In this video, you'll learn how to pass non-type template arguments to function templates. 

  • Assignment II0:11
  • Variadic Templates - Part I9:47

    This is a C++11 feature. This video will explain and demonstrate how to write function templates that can accept arbitrary number/type of arguments.

  • Variadic Templates - Part II4:50

    This is a continuation of the previous lecture and will demonstrate more features of variadic templates.

Requirements

  • Basic knowledge of C++
  • Understand basic C++ constructs such as functions and classes

Description

Note:This is an excerpt from the course Beginning Modern C++. 

C++ templates are used for creating high performance algorithms and classes. Most of the high performance libraries, such as Active Template Library, Windows Template Library, Adaptive Communication Environment, etc, have been implemented through C++ templates.

Templates are a challenge for any novice C++ programmer. But, this course will help you understand the syntax of templates. It gently takes you through the basics and then slowly builds upon the advanced concepts such as specialization, variadic templates, etc. All the concepts are explained with examples in Visual Studio, but will work in any C++11 compiler.

Have fun learning templates!

Who this course is for:

  • C++ programmers who want to understand templates