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.

Advanced

91 Lessons

8h

Certificate of Completion

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.

AI-POWERED

Explanations

AI-POWERED

Explanations

This course includes

121 Playgrounds

This course includes

121 Playgrounds

Course Overview

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. ...Show More

Course Content

1.

Introduction

Get familiar with C++ templates, covering fundamentals and advanced programming concepts for better abstraction.
2.

Basics

Unpack the core of function, class, and template parameter concepts in C++ templates.
3.

Details

Examine C++ template instantiation, variadic templates, fold expressions, class template friendship, and dependent names usage.
4.

Techniques

Grasp the fundamentals of automatic return type, template metaprogramming, type-traits, and constexpr in C++.
5.

Design

Dig into static and dynamic polymorphism, CRTP, expression templates, idioms, and patterns in C++.
6.

Future

7 Lessons

See how it works to enhance C++ generic programming with concepts, constraints, and type safety.
7.

Conclusion

2 Lessons

Master the significance and future enhancements of templates in C++, and learn about the author.

Course Author

Add a deep mastery of C++ to your skillset, and make yourself a more in-demand developer.


Path Cover

Learn C++ for Programmers

Learn C++ from scratch, and get hands-on with one of the most popular programming languages in the world.
Explore Path

7 Modules

Trusted by 1.4 million developers working at companies

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Evan Dunbar

ML Engineer

Carlos Matias La Borde

Software Developer

Souvik Kundu

Front-end Developer

Vinay Krishnaiah

Software Developer

Eric Downs

Musician/Entrepeneur

Kenan Eyvazov

DevOps Engineer

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Hands-on Learning Powered by AI

See how Educative uses AI to make your learning more immersive than ever before.

Instant Code Feedback

Evaluate and debug your code with the click of a button. Get real-time feedback on test cases, including time and space complexity of your solutions.

AI-Powered Mock Interviews

Adaptive Learning

Explain with AI

AI Code Mentor