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!
Introduces generic programming. Also shows the basic syntax of templates that will get you started with writing your own function templates.
Learn how to customize function templates for a specific type when the function algorithm is unsuitable for that type.
In this video, you'll learn how to pass non-type template arguments to function templates.
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.
This is a continuation of the previous lecture and will demonstrate more features of variadic templates.
You'll learn how to write classes that can work with arbitrary types. This will form the base for learning STL containers.
This video explains how to specialize class template for a specific data type.
This video builds upon the previous lecture and shows how to specialize member functions only instead of the whole class
Learn how to partially specialize class templates. Partial specialization is used by smart pointers for use with dynamic arrays.
Type aliases were introduced in C++11. This concept allows us to create new names for existing types, so that it is easier to represent it in our domain.
Civil engineer who found his calling in software development. Never worked as a Civil engineer, jumped at the first chance and started teaching C++ & Visual C++ 13 years ago. Currently, trains software professionals in various IT companies in India in different technologies, such as C++, Advanced C++, STL, Design Patterns, Android, Unity, Linux, etc. Very passionate about teaching and has trained more than 10,000 software professionals in a teaching career spanning more than 10 years. An avid gamer, currently trying his hand with game development in Unity & Unreal. Has a few Android applications to his credit, including one on Design Patterns.
Only thing he likes more than C++ is Modern C++.