type-traits

Templates: Misconceptions and Surprises

I often teach the basics to templates. Templates are special. Therefore, I encounter many misconceptions which cause surprises. Here are a few of them.

Read more
Views: 14865

C++ Core Guidelines: Programming at Compile Time with Type-Traits (The Second)

The type-traits library supports type checks, type comparisons, and type modifications at compile time. Right! Today, I write about type modifications at compile time.

Read more
Views: 27391

C++ Core Guidelines: Programming at Compile Time with the Type-Traits

My journey through programming at compile time began in the last posts with template metaprogramming. Today, I jump from C++98 to C++11. This is a jump to the type-traits library which is template metaprogramming in a standardised way.

Read more
Views: 21588

Type-Traits: Performance Matters

If you look carefully, you see, type-traits have a big optimization potential. The type-traits support in the first step to analyse the code at the compile-time and in the second step, to optimize the code based on that analysis. How is that possible? Dependent on the type of variable a faster variant of an algorithm will be chosen.

Read more
Views: 15835

Compare and Modify Types

The type-traits library empowers you to compare and modify types. All is done at compile time therefore there is no performance penalty.

Read more
Views: 17220

Check Types

Template Metaprogramming is programming at compile time. But what has template metaprogramming in common with the type-traits library? A lot! The type-traits library is pure template metaprogramming, tamed in a library. With this post, my presentation of the type-traits library becomes more structured.

Read more
Views: 18288

More and More Save

In the post Statically checked I wrote that the functions of the type-traits library are an ideal fit for static_assert. The reason is that static_assert requires a constant expression. The functions of the type-traits library provide a lot of checks which can be performed at compile time. With these posts, I will prove my statement.

Read more
Views: 14669

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 553

Yesterday 7029

Week 40877

Month 107543

All 7375383

Currently are 142 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments