Skip to content

Modern Template Techniques

License

Notifications You must be signed in to change notification settings

denismurphy/modern-template-techniques

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Modern Template Techniques

This repository explores advanced template techniques in C++, including class template argument deduction, smart pointers, structs, classes, abstract classes, virtual functions, auto, lambda, and constexpr.

🎯 The goal: Personal learning about modern template techniques.

📚 Contents

This repo contains various examples illustrating different advanced template techniques and their use cases. Each example is well-commented and easy to understand.

🧩 Class Template Argument Deduction

Demonstrates the class template argument deduction feature to deduce template arguments from constructor parameters.

🔗 Smart Pointers

Explores using smart pointers to manage the lifetime of objects in class templates and structs.

🏗️ Structs and Classes

Shows how structs and classes can be used together in template programming.

🎭 Abstract Classes and Virtual Functions

Illustrates the combination of abstract classes and virtual functions in template programming.

⚡ Auto and Lambda

Demonstrates how auto and lambda can be used with templates to create more concise and expressive code.

⏱️ Constexpr

Explores using constexpr to make template code more efficient at runtime and during compile-time.

📄 License

This repository is licensed under the MIT license.