P3816R2 — Hashing meta::info (7 items) SG7 Reflection
Matt Cummins, Valentyn Yukhymenko
This paper proposes a new standard library template consteval_hash, with an initial specialization for meta::info, to provide a standard interface for compile-time hashing. The primary motivation is to enable unordered associative containers such as unordered_map and unordered_set to be used with meta::info keys in constexpr contexts, complementing the constexpr containers proposed in P3372. The proposed hash has semi-stable semantics, remaining consistent within a compilation run and across repeated runs of the same source code, while permitting values to change when source code is modified.

References — Anthropic Citations API

[1]
"consteval name_of(meta::info r) -> string_view"
[2]
"consteval name_of(meta::info r) -> string_view"
[3] chars 61217–62248
"Further, hashing the same object multiple times (within a translation unit) will return the same value each time for any given compiler run.

Something that requires more discussion is the..."

[4]
"#define __lib_consteval_hash_template YYYYXXL // also in and #define __lib_consteval_hash_meta_info YYYYXXL // also in "
[5]
"Disabled specializations of `consteval_hash`> {.cpp} are not function object types ([function.objects])."
[6]
"By separating compile-time hashing into a distinct type, this inconsistency is no longer an problem."
Summary: P3816R2 proposes adding a consteval_hash class template and a specialization for std::meta::info to enable compile-time hashing of reflection values, primarily to support consteval-time associative containers. It also proposes consteval_hash specializations for standard scalar and string-like types.
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.