C++ Core Guidelines: Surprises with Argument-Dependent Lookup

There is, in particular, one rule left to template interfaces which are quite interesting: T.47: Avoid highly visible unconstrained templates with common names. Admittedly, the rule T47 is often the reason for unexpected behaviour because the wrong function is called.

Read more
Tags: ADL
Views: 27646

C++ Core Guidelines: Regular and SemiRegular Types

The topic for today is quite important when you create your type: Regular and SemiRegular types.

Read more
Views: 24375

C++ Core Guidelines: Template Interfaces

This post is about template interfaces which are due to the C++ core guidelines: "...a critical concept", because a template interface is "a contract between a user and an implementer - and should be carefully designed.".

Read more
Views: 54337

C++ Core Guidelines: Pass Function Objects as Operations

An interface is a contract between a user and an implementer and should, therefore, be written with great care. This holds also true if you pass an operation as an argument.

Read more
Tags: Lambdas
Views: 25262

C++ Core Guidelines: Definition of Concepts, the Second

Let me continue with the rules for defining concepts in the guidelines. In this post, the first of the three remaining rules are quite sophisticated.

Read more
Tags: Concepts
Views: 19239

C++ Core Guidelines: Rules for the Definition of Concepts

Although rule T.11 states: Whenever possible use standard concepts you sometimes have to define your concepts. This post gives you rules to do it.

Read more
Tags: Concepts
Views: 16364

C++ Core Guidelines: Rules for the Usage of Concepts

We will get concepts with high probability in C++20. Here are the rules from the C++ core guidelines to use them.

Read more
Tags: Concepts
Views: 42076

C++ Core Guidelines: Better Specific or Generic?

Concepts revolutionise the way we think about and use generic programming. They didn't make it in C++11, or C++17 but with C++20 we will get them with high probability.

Read more
Tags: Concepts
Views: 18983

C++ Core Guidelines: Type Erasure with Templates

In the last post C++ Core Guidelines: Type Erasure, I presented two ways to implement type erasure: void pointers and object orientation. In this post, I bridge dynamic polymorphism (object-orientation) with static polymorphism (templates) to get type erasure with templates.

Read more
Views: 57648

C++ Core Guidelines: Type Erasure

Rule "T.5: Combine generic and OO techniques to amplify their strengths, not their costs"  of the core guidelines to generic programming uses type erasure as an example. Type erasure? Really! Of course, it takes me two posts to explain this advanced template technique.

Read more
Views: 91849

Mentoring

Stay Informed about my 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

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

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 3878

Yesterday 7411

Week 27106

Month 171277

All 11652431

Currently are 177 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments