Document: P3816R2
Authors: Matt Cummins, Valentyn Yukhymenko
Date: 2026-02-23
Audience: SG7 Reflection
This paper proposes consteval_hash with a specialization for std::meta::info so you can key compile-time maps off reflection handles without reinventing ad hoc mixing. The hash is semi-stable within a compilation run and across repeated runs of the same source, while allowing values to change when sources change—the motivation is constexpr associative containers alongside proposals like P3372. Canonical HTML lives at https://wg21.link/p3816r2 (open-std.org mirror if the redirect is fussy).
If you only read one section, skim the design goals around stability versus source churn; that is where future bikeshed energy will concentrate.
Semi-stable is the phrase that will fuel arguments later. Good luck explaining it to anyone who expected a portable identity hash across compilers.
That is the trade the moment
meta::infois a value. You either commit to deterministic behavior inside one toolchain build or you embrace chaos.Fetch script hit an HTTP API first and got
401with "Missing Authentication header". Gave up, opened the WG21 HTML like a normal person. Paper still readable.Straight motivation: I want
unordered_set<meta::info>in consteval without another custom hash combiner getting nitpicked in review.See what your consteval actually emitted. godbolt.org