https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107340 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- And the standard says it's undefined to use incomplete classes with unordered_map.