intermediate

Substitution Failure is Error and Not An Error -- Milad Kahsari Alhadi

All you need to know:

Substitution Failure is Error and Not An Error

by Milad Kahsari Alhadi

From article:

I decided to write an article about the Substitution Failure issue when you write generic programs with c++ for those people who are looking for a clear and step by step introduction about it (without making everything complicated). In this article you will learn what will happen when you call a template function. 

Don’t Make Your Interfaces *Deceptively* Simple--Jonathan Boccara

A good thing to think about.

Don’t Make Your Interfaces *Deceptively* Simple

by Jonathan Boccara

From the article:

Just because we can provide an interface doesn’t mean that we should.

At least this is one of the takeaways that I got from from Howard Hinnant’s opening keynote at Meeting C++ 2019.

In this impressive keynote, Howard made a presentation about <chrono> and the host of features it brings in C++20. But beyond showing us how to use <chrono>, Howard explained some of the design rationale of this library.

Those are precious lessons of design, especially coming from someone who had a substantial impact on the design of the standard library. I believe we can apply those practices to our own code when designing interfaces.

So, just because we can provide an interface doesn’t mean that we should. To illustrate what this means in practice, let’s go over two examples in the C++ standard library...