Tag Archives: concepts

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 , , , | 9 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

Concepts without Concepts

“Concept” can mean two things in the context of C++ generic libraries: Something informal: something we know about template parameters, and can tell to other human programmers, e.g. in documentation. A language feature. This post is about concepts in the … Continue reading

Posted in programming | Tagged , , , , | 10 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

Clever overloading

This post is intended to be a light introduction to certain C++ guru tricks. I want to introduce a couple of concepts that typically put normal people off. If you are an expert you will probably not learn anything new, … Continue reading

Posted in programming | Tagged , , , , | 24 Comments

Type erasure — Part II

In the previous post, we have seen that there is a number of ways to erase the type of an object while still holding a “handle” to it and being able to make use of it. This can be summarized … Continue reading

Posted in programming | Tagged , , , , | 6 Comments

Concept axioms — what for?

In this post I will be talking about axioms in C++ concepts. C++ (i.e., C++11) does not have language support for concepts, so I will be talking about a nonexistent feature; a possible future addition to C++. Yet, since concepts … Continue reading

Posted in programming | Tagged , , | 3 Comments