Why having concepts?
by Andrzej Krzemieński
From the article:
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 issues with concepts’ mechanics. One could look at Concepts Lite as three features:
- A superior alternative to enable_if (or overload hiding).
- The subsumption relation that enables the additional control of partial ordering in the overload resolution process.
- A convenient tool for building compile-time predicates that check for valid types and expressions.
In this post I will only focus on the first feature, and try to answer the question, “what do we need Concepts Lite for, given that we already have std::enable_if (and SFINAE)?”