Header Reference: <concepts>
Header Reference: <concepts>
Standard concepts and comparison constraints used to write clearer constrained templates.
Header Reference: <concepts>
Standard concepts and comparison constraints used to write clearer constrained templates.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
Header reference pages are meant to answer a practical question quickly: what this header provides, when to reach for it, and which usage rules are easiest to get wrong.
<concepts>std::same_asstd::derived_fromstd::convertible_tostd::common_withstd::integral, std::signed_integral, std::unsigned_integral, std::floating_pointstd::assignable_fromstd::swappable, std::swappable_withstd::destructible, std::constructible_from, std::default_initializable, std::move_constructible, std::copy_constructiblestd::equality_comparable, std::totally_orderedstd::invocable, std::regular_invocable, std::predicatestd::relation, std::equivalence_relation, std::strict_weak_orderstd::regular, std::semiregularUse <concepts> to express template requirements directly in signatures instead of burying them in substitution failures.
requires#include <concepts>
int main() {
// Start with the primary facility from <concepts>.
// Then verify lifetime, invalidation, ordering, or error-handling rules.
return 0;
}