Template Argument Deduction of Class Templates

In my last post Template Arguments, I wrote about function template type deduction (C++98) and auto type deduction (C++11). Today I wear more modern hats. I start with automatic type deduction of non-type template parameters and class templates (C++17) and finish with automatic type deduction of concepts (C++20).

Read more
Views: 575

Template Arguments

It is quite interesting how the compiler deduces the types for the template arguments. To make it short, you get most of the time the type you expect. The rules do not only apply to function templates (C++98) but also to auto (C++11), to class templates (C++17), and concepts (C++20).

Read more
Views: 1973

Alias Templates and Template Parameters

Today, I write about two topics: alias templates and template parameters. Alias templates are a way to give a name to a family of types. Template parameters can be types, non-types, and templates themselves.

Read more
Views: 3743

Surprise Included: Inheritance and Member Functions of Class Templates

In my last post "Class Templates", I presented the basics about those. Today, I may surprise you with the inheritance of class templates and the instantiation of member functions of class templates.

Read more
Views: 3471

Class Templates

A function template represents a family of functions. Accordingly, a class template represents a family of classes. Today, I want to introduce class templates.

Read more
Views: 3469

Function Templates - More Details about Explicit Template Arguments and Concepts

In the last post "Function Templates", I wrote about the overloading of function templates and automatically deducing the return type of a function template. Today, I dive deeper and specify explicitly the template arguments of a function template and bring concepts into the play.

Read more
Views: 3891

Function Templates

A function template is a family of functions. In this post, I want to dive deeper into function templates.

Read more
Views: 4954

Templates - First Steps

The idea of this post is quite simple. I want to visualize templates and, in particular, the process of template instantiation. Thanks to C++ Insights, this visualization is pretty easy.

Read more
Views: 12563

And The Winner is: Templates

The future of C++ speaks templates, and so does my blog Modernes C++. Based on the poll of my last post "Quo Vadis - Modernes C++", my next presumably 50 - 100 posts explain the details to templates. In this post, I want to give you an idea of the upcoming posts.

Read more
Views: 4975

My Newest E-Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 772

Yesterday 7645

Week 8417

Month 148624

All 6588705

Currently are 173 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments