C++26: Ordering of constraints involving fold expressions
C++26 introduces a solution to the ambiguity issues in overload resolution involving fold expressions. The new concept of fold expanded constraints allows the compiler to properly recognize and prioritize more constrained overloads. This change addresses limitations present in C++20 and C++23 regarding constraint subsumption.
- ▪C++26 resolves ambiguity in overloads by introducing fold expanded constraints.
- ▪The compiler can now recognize when one constraint subsumes another, even with fold expressions involved.
- ▪This update improves the handling of variadic overloads constrained by fold expressions.
2 outlets in our directory ran this story, first to last over 8 hours. All of the coverage we found sits in one bucket: centre. That one-sidedness is itself worth noticing.
Hacker News (Newest) files mainly under programming. We currently carry 5,306 of its stories.
Story provenance
Source · retrieval · rights · ranking — open for full record
inspect →
Attribution is not the same as permission. This drawer separates discovery metadata, excerpts, WeSearch-generated summaries, reuse status, and whether the publisher receives the visit. Nothing here claims a legal grant the publisher has not made.
Record
| Original publisher | Sandor Dargo’s Blog |
| Canonical URL | https://www.sandordargo.com/blog/2026/05/27/cpp26-constraints-ordering-fold-expressions |
| Publication time | Wed, 27 May 2026 15:24:49 +0000 |
| Retrieval time | 2026-05-27T15:38:01.782Z |
| Last seen | 2026-05-27T15:38:01.782Z |
| Headline source | Publisher (no WeSearch rewrite) |
| Excerpt source | publisher body |
| Excerpt method | First ~120 words (~800 chars) of extracted publisher body, fair-use limited. |
| Summary | WeSearch · cerebras-chat (WeSearch summarizer) |
| Summary source text | contentText |
| Citation coverage | Summary is a WeSearch-generated derivative; primary citation is the original publisher URL. |
| Cluster | T5FqfBXqOid9 · 2 stories |
| Cluster logic | Grouped by semantic title/content similarity across sources within a rolling window. Same-publisher template collisions are excluded from coverage comparison. |
| Ranking reason | Story pages are not engagement-ranked. Hub feeds use recency, with optional source-diversified chronological ordering (cap consecutive stories per source). No personalized ranking. |
| Publisher visit | Yes — open original |
| Substitutes article? | No — link-out required for full text |
Rights status (four layers)
WeSearch handling by dimension
| Indexing | May the item be indexed (stored, ranked, made findable)? | Allowed |
| Snippet | May a short excerpt of the publisher's text be shown? | Allowed |
| AI summary | May WeSearch generate its own short summary of the article? | Limited |
| Retrieval / RAG | May the content be exposed for third-party retrieval-augmented generation? | Not asserted |
| Model training | May the content be used to train AI models? | Not asserted |
| Commercial reuse | May the content be reused commercially? | Not permitted |
Basis: Derived from the published RSS/Atom feed. Contact: [email protected]. Reviewed: 2026-07-24.
Opening excerpt (first ~120 words) tap to expand
You have two overloads of g(). One requires A<T> for each element in a pack, the other requires C<T> — where C is a stricter concept that subsumes A. Both apply to the types you’re passing. The compiler should pick the more constrained version. But instead it complains about an ambiguous call.This is a limitation of how C++20 and 23 handle constraints that use fold expressions — fixed in C++26.Constraint subsumption, brieflySubsumption is the compiler’s mechanism for ordering overloads by how constrained they are. If concept C is defined as A && B, then any type satisfying C also satisfies A. The compiler recognizes this and, when resolving an overload, prefers the more constrained one — no ambiguity.As we saw a few years back, subsumption has quirks.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Sandor Dargo’s Blog.