Full Specialization of Function Templates

As you may know from my previous post, Template Specialization, a function template can only be full but not partially specialized. To make my long story short: Don't specialize function templates. Just use function overloading.

Read more
Views: 18919

Template Specialization - More Details About Class Templates

After I presented in my last post Template Specialization, the basics about template specialization, I dig deeper today. I want to present the partial and full specialization of a class template as a compile-time if.

Read more
Views: 13415

Template Specialization

Templates define the behavior of families of classes or functions. Often it is required that particular types or non-types may be treated special. To support this use case, you can specialize templates.

Read more
Views: 20882

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: 16108

Template Arguments

It is pretty 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: 20158

The New pdf Bundle is Ready: C++20 Coroutines

I have prepared the pdf bundle. To get it is quite simple.

Read more
Views: 7025

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: 28248

"Concurrency with Modern C++" Update to C++20

I am happy to announce. I updated my "Concurrency with Modern C++" book to C++20. This update includes a restructuring of the book and more than 50 pages and runnable examples. Now, you get about 650 pages of concurrency in C++ and nearly 200 runnable examples. Here is more info: https://leanpub.com/concurrencywithmodernc       Read more
Views: 9291

Surprise Included: Inheritance and Member Functions of Class Templates

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

Read more
Views: 43143

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: 21077

Stay Informed about my Mentoring

 

Mentoring

English 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

Course: The All-in-One Guide to C++20

Course: Master Software Design Patterns and Architecture in C++

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 4038

Yesterday 4344

Week 40916

Month 21162

All 12099371

Currently are 166 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments