Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Concept, constraint » ?

Aussi appelé : concept (C++) · constraint

Definition 4.7 University Computer Science — Year 2 · Chapitre 4 — Templates and Generic Programming

A concept is a named, compile-time predicate on template arguments, defined by template <typename T> concept C = expression;, where the expression may combine other concepts and requires expressions listing operations that must be valid. A constraint attaches concepts to a template, as template <C T> or requires C<T>: the template is then considered only for arguments that satisfy them. Concepts are a C++20 feature.

Lire dans le chapitre →