...

/

Use-cases for Concepts

Use-cases for Concepts

Discover use-cases of concepts in C++20.

First and foremost, concepts are compile-time predicates. A compile-time predicate is a function that is executed at compile-time and returns a boolean.

Before I dive into the various use-cases of concepts, I want to demystify concepts and present them simply as functions returning a boolean at compile time.

Compile-time predicates

A concept can be used in a ...