C++20 concepts: part 2

In the first article about concepts, the basic rationale behind C++20’s concept was explained with the help of a very simple generic print method. Specifically the problem with pre-C++20 generic code not enforcing a requirements on the interface it should provide on the template type parameter T eventually causing a messy compilation error during substitution of T with the actual type.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gajendra Gulgulia

Gajendra Gulgulia

I'm a backend software developer and from time to time I also like to explore web development