The Type-Traits Library: Type Comparisons

In my last post "The Type-Traits Library: Type Checks" I introduced type checks at compile time with the type-traits library. Today, I write about type comparisons at compile time.

Read more
Views: 572

And the Winners for the Seven Vouchers for Fedor's Book "The Art of Writing Efficient Programs" are

I'm happy to present the seven winners in this post including their answers.

Read more
Views: 1460

The Type-Traits Library: Type Checks

The type-traits library is part of C++11 and supports type checks, type comparisons, and type modifications at compile-time. The library has more than 100 functions but grows with each new C++ standard release. Today, I present the type checks.

Read more
Views: 2063

Template Metaprogramming - Hybrid Programming

First of all, hybrid programming is not an official term. I created it to emphasize a very interesting aspect of templates. The difference between function arguments and template arguments.

Read more
Views: 3083

Seven Voucher for Fedor G. Pikus Book "The Art of Writing Efficient Programs"

I'm happy to announce that I have to offer five vouchers for a digital and two vouchers for a printed issue of Fedor G. Pikus book "The Art of Writing Efficient Programs". The sponsor of these coupons is Packt.

Read more
Views: 2693

Template Metaprogramming - How it Works

In my last post "Template Metaprogramming - How it All Started", I wrote about the roots of template metaprogramming and presented the hello world of template metaprogramming: calculating the factorial of a number at compile time. In this post, I will write about, how template metaprogramming can be used to modify types at compile time.

Read more
Views: 3022

Template Metaprogramming - How it All Started

Metaprogramming is programming on programs. C++ applies metaprogramming at compile time. It started in C++98 with template metaprogramming, was formalized in C++11 with the type-traits library, and since C++11 has steadily improved. The main driving force is constant expressions. In this post, I want to write about its roots.

Read more
Views: 7157

Automatic Return Type (C++11/14/20)

I started my discussion about the  "Automatic Return Type (C++98)" in my last post. Today, I'm faced with the same challenge but solve it with C++11, C++14, and C++20.

Read more
Views: 4184

Automatic Return Type (C++98)

Depending on the used C++ standard, there are different ways to return the right return type of a function template. In this post, I start with traits (C++98), continue in my next post with C++11/14, and end with concepts (C++20).

Read more
Views: 4500

Dependent Names

A dependent name is essentially a name that depends on a template parameter. A dependent name can be a type, a non-type, or a template parameter. To express that a dependent name stands for a type or a template, you have to use the keywords typename or template.

Read more
Views: 7819

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

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

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 857

Yesterday 8760

Week 9617

Month 205774

All 7691166

Currently are 143 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments