Tag Archives: generic programming

Concepts — case studies

This post has been inspired by the readers’ questions about using concepts to solve real problems. We will have a look at two such problems and see if, and how, concepts can help. Case Study 1 My concept has two … Continue reading

Posted in programming | Tagged , , | 3 Comments

Decent concepts

Last year I published two posts on writing concepts: Concept Archetypes, Semantic requirements in concepts. Having had some time to reflect upon these posts, I now realize that the model presented in them is not complete. In this post I … Continue reading

Posted in programming | Tagged , , , | 1 Comment

Semantic requirements in concepts

The word ‘concept’ in the context of C++ generic programming has two meanings. The first is more abstract: it is the notion from the domain of Generic Programming (GP) in general. GP is not tied to any specific language: it … Continue reading

Posted in programming | Tagged , , , | 8 Comments

A friendly type predicate

This is a sequel to the previous post on writing a custom type predicate. One of the readers on Reddit made a very insightful observation. The user has implemented a type that she intends to use with our library, call … Continue reading

Posted in programming | Tagged , , , , , | 1 Comment

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 , , , , | 11 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 , , | 31 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 , , , , | 17 Comments

Designing a generic library

I consider the Standard Template Library an amazing piece of work that constitutes a milestone in the evolution of programming languages. Not only is it useful in itself, but it also brought into existence the notion of generic programming. What … Continue reading

Posted in programming | Tagged | 1 Comment