Tag Archives: advanced-c++

Concepts Lite vs enable_if

This post contains quite advanced material. I assume you are already familiar with Concepts Lite. For an overview of what Concepts Lite is, I recommend this proposal. Also, I have found this blog very useful regarding the details of and … Continue reading

Posted in programming | Tagged , , , | 8 Comments

Is constructible?

Today I want to share with you something that really surprised me. Currently, Tomasz Kamiński and Ville Voutilainen are working on fixing a certain issue with std::optional’s converting constructors (which deserves a separate post). At some point, in the solution, … Continue reading

Posted in programming | Tagged , , | 9 Comments

Competing constructors

We start with a known C++ gotcha: In this post I want to analyze the source of the problem a bit further, and offer some suggestions on class design.

Posted in programming | Tagged , , , , | 7 Comments

Diagnosable validity

Certain combinations of types and expressions can make a C++ program ill-formed. “Ill-formed” is a term taken from the C++ Standard and it means that a program is not valid, and compiler must (in most of the cases) reject it. … Continue reading

Posted in programming | Tagged , , , , | 8 Comments

A customizable framework

In this post I want to describe a problem my colleagues have faced a couple of times recently, and show how it can be solved with C++. Here is the goal. We want to provide a function (or a set … Continue reading

Posted in programming | Tagged , , | 28 Comments

Overload resolution

This post is an introduction to another one that I intend to write in the future. The goal of this one is to go over the concepts of function template specialization, function (template) overloading, argument dependent lookup (ADL) and overload … Continue reading

Posted in programming | Tagged , , , , | 16 Comments

A conditional copy constructor

In this post we will try to define a ‘wrapper’ class template that does or does not have a copy constructor depending on whether the wrapped class has it. This will be a good opportunity to explore in depth a … Continue reading

Posted in programming | Tagged , , , , , | 3 Comments