[PATCH] c++, libstdc++, v2: Implement C++26 P2641R4 - Checking if a union alternative is active

Jakub Jelinek jakub@redhat.com
Mon Aug 31 12:05:34 GMT 2026


On Thu, Aug 27, 2026 at 11:51:05AM -0700, Jason Merrill wrote:
> > Shall we remove the hash_map record on deallocation instead or store
> > something magic other than void_node?
> 
> Removing it sounds elegant, if there isn't a diagnostic quality reason to go
> the other way.

Unfortunately, there are various diagnostic quality regressions when it is
removed on EOB,
g++.dg/cpp1y/constexpr-lifetime{1,2,3,4,5,6,7}.C
g++.dg/cpp2a/constexpr-lifetime{1,2}.C
g++.dg/reflect/extract8.C
so I'll try distinguishing end of lifetime vs. end of object instead.

	Jakub



More information about the Libstdc++ mailing list