P4032R0 — Strong ordering for meta::info
(4 items)
SG17, EWG
This paper proposes that std::meta::info be three-way comparable via operator<=> with a result type of std::strong_ordering, based on an implementation-defined strict total order over all reflection values. The proposed ordering is required to be consistent with std::type_order for reflections representing types, and also extends to non-type reflections. The paper provides wording relative to N5032 and simplifies std::type_order's specification to be defined in terms of the new reflection comparison operator.
- Section 5.1, proposed [basic.fundamental] wording — "such the reflection values" is missing the word "that"; should read "such that the reflection values." This is in proposed normative wording. [2] [1]
- Section 5.1 [basic.fundamental] (new Note 1) vs. Section 5.5 [compare.type] (deleted Note 1) — The deleted note illustrates with int, const int, and int&. The replacement note changes const int to const int&, losing the pedagogical point that top-level cv-qualification alone distinguishes reflections. The second example should be ^^const int, not ^^const int&. [2]
- Section 2 (Background) — "Reflecton" is misspelled; should be "Reflection." [1] [3]
References — Anthropic Citations API
[1]
chars 775–852
"[P2996R13] (Reflecton for C++26) introduced meta::info as a structural type. "
"[P2996R13] (Reflecton for C++26) introduced meta::info as a structural type. "
[2]
chars 3859–4140
"[basic.fundamental] … «+There is an implementation-defined strict total order of reflections, such the reflection values that compare unequal ([expr.eq]) are also inequivalent in this total..."
"[basic.fundamental] … «+There is an implementation-defined strict total order of reflections, such the reflection values that compare unequal ([expr.eq]) are also inequivalent in this total..."
[2]
chars 3859–4140
"[basic.fundamental] … «+There is an implementation-defined strict total order of reflections, such the reflection values that compare unequal ([expr.eq]) are also inequivalent in this total..."
"[basic.fundamental] … «+There is an implementation-defined strict total order of reflections, such the reflection values that compare unequal ([expr.eq]) are also inequivalent in this total..."
[3]
"New note: "[Note 1: ^^int, ^^const int& and ^^int& compare unequal to each other." Deleted note: "[Note 1 : int, const int and int& are different types.""
"New note: "[Note 1: ^^int, ^^const int& and ^^int& compare unequal to each other." Deleted note: "[Note 1 : int, const int and int& are different types.""
Summary: P4032R0 proposes replacing the unspecified comparison semantics of meta::info with a strong ordering guarantee, moving the relevant specification from [compare.type] into [basic.fundamental] and defining an implementation-defined strict total order over reflections. Three defects were found in the proposed wording and supporting prose.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.