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
Add CommentViews: 8622

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
Add CommentViews: 11604

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
Add CommentViews: 10684

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 a variable a faster variant of an algorithm will be chosen.

Read more
Add CommentViews: 9424

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
Comments 2Views: 10060

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
Comments 2Views: 9425

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 provides a lot of checks which can be performed at compile time. With this posts I will prove my statement.

Read more
Comments 3Views: 8081

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)

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 5967

All 2701984

Currently are 148 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments