#
A constraint P subsumes a constraint Q if and only if, for every disjunctive clause
[Example 1: 
Let A and B be atomic constraints.
The constraint A  ∧ B subsumes A, but A does not subsume A  ∧ B.
The constraint A subsumes A  ∨ B, but A  ∨ B does not subsume A.
Also note that every constraint subsumes itself.
— end example]
[Note 1: 
The subsumption relation defines a partial ordering on constraints.
This partial ordering is used to determine
— end note]
The associated constraints C of a declaration D are eligible for subsumption unless C contains a concept-dependent constraint.
A declaration D1 is at least as constrained as a declaration D2 if
  • D1 and D2 are both constrained declarations and D1's associated constraints are eligible for subsumption and subsume those of D2; or
  • D2 has no associated constraints.
A declaration D1 is more constrained than another declaration D2 when D1 is at least as constrained as D2, and D2 is not at least as constrained as D1.
[Example 2: template<typename T> concept C1 = requires(T t) { --t; }; template<typename T> concept C2 = C1<T> && requires(T t) { *t; }; template<C1 T> void f(T); / #1 template<C2 T> void f(T); / #2 template<typename T> void g(T); / #3 template<C1 T> void g(T); / #4 f(0); / selects #1 f((int*)0); / selects #2 g(true); / selects #3 because C1<bool> is not satisfied g(0); / selects #4 — end example]
[Example 3: template<template<typename T> concept CT, typename T> struct S {}; template<typename T> concept A = true; template<template<typename T> concept X, typename T> int f(S<X, T>) requires A<T> { return 42; } / #1 template<template<typename T> concept X, typename T> int f(S<X, T>) requires X<T> { return 43; } / #2 f(S<A, int>{}); / ok, select #1 because #2 is not eligible for subsumption — end example]
A non-template function F1 is more partial-ordering-constrained than a non-template function F2 if
  • they have the same non-object-parameter-type-lists ([dcl.fct]), and
  • if they are member functions, both are direct members of the same class, and
  • if both are non-static member functions, they have the same types for their object parameters, and
  • the declaration of F1 is more constrained than the declaration of F2.
105)105)
A constraint is in disjunctive normal form when it is a disjunction of clauses where each clause is a conjunction of fold expanded or atomic constraints.
For atomic constraints A, B, and C, the disjunctive normal form of the constraint A  ∧ (B  ∨ C) is (A  ∧ B)  ∨ (A  ∧ C).
Its disjunctive clauses are (A  ∧ B) and (A  ∧ C).
106)106)
A constraint is in conjunctive normal form when it is a conjunction of clauses where each clause is a disjunction of fold expanded or atomic constraints.
For atomic constraints A, B, and C, the constraint A  ∧ (B  ∨ C) is in conjunctive normal form.
Its conjunctive clauses are A and (B  ∨ C).

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant