AI-powered learning
Save this course
Generic Programming Templates in C++
Explore the power of C++ templates, from function and class basics to advanced features like instantiation and concepts, enhancing code flexibility, reusability, and abstraction without performance loss.
4.3
91 Lessons
8h
Join 2.9 million developers at
Join 2.9 million developers at
Learning Roadmap
1.
Introduction
Introduction
Get familiar with C++ templates, covering fundamentals and advanced programming concepts for better abstraction.
2.
Basics
Basics
Unpack the core of function, class, and template parameter concepts in C++ templates.
3.
Details
Details
18 Lessons
18 Lessons
Examine C++ template instantiation, variadic templates, fold expressions, class template friendship, and dependent names usage.
4.
Techniques
Techniques
18 Lessons
18 Lessons
Grasp the fundamentals of automatic return type, template metaprogramming, type-traits, and constexpr in C++.
5.
Design
Design
24 Lessons
24 Lessons
Dig into static and dynamic polymorphism, CRTP, expression templates, idioms, and patterns in C++.
6.
Future
Future
7 Lessons
7 Lessons
See how it works to enhance C++ generic programming with concepts, constraints, and type safety.
7.
Conclusion
Conclusion
2 Lessons
2 Lessons
Master the significance and future enhancements of templates in C++, and learn about the author.
Certificate of Completion
Showcase your accomplishment by sharing your certificate of completion.
Complete more lessons to unlock your certificate
Developed by MAANG Engineers
ABOUT THIS COURSE
Templates are one of the many powerful features of Modern C++ programming. And with each new C++ standard, they become more important.
Templates provide an efficient way to make your code more flexible and reusable, this way you can avoid repeating code that would otherwise be identical except for different types. Templates also give you the ability to provide abstraction without a performance penalty.
However, templates can be difficult to apply, can be counterintuitive, and have tricky error messages.
This course gives you the necessary information to overcome these hurdles and dive into the advanced topics. You’ll visit the basics such as function and class templates, and then explore the details to templates such as instantiation and fold expressions. Our journey also includes techniques based on templates, the design, and future directions of templates such as concepts. Based on this exhaustive tour of templates, a basic understanding of C++ is sufficient to master this course.
Let’s get started!
ABOUT THE AUTHOR
Rainer Grimm
I’ve worked as a software architect, team lead, and instructor since 1999. I like to write articles on the topics C++, Python, and Haskell in my spare time. I often speak at conferences.
Trusted by 2.9 million developers working at companies
A
Anthony Walker
@_webarchitect_
E
Evan Dunbar
ML Engineer
S
Software Developer
Carlos Matias La Borde
S
Souvik Kundu
Front-end Developer
V
Vinay Krishnaiah
Software Developer
Built for 10x Developers
No Passive Learning
Learn by building with project-based lessons and in-browser code editor


Personalized Roadmaps
The platform adapts to your strengths & skills gaps as you go


Future-proof Your Career
Get hands-on with in-demand skills


AI Code Mentor
Write better code with AI feedback, smart debugging, and "Ask AI"




MAANG+ Interview Prep
AI Mock Interviews simulate every technical loop at top companies


Free Resources