https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84684
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Or also defining another method in union_composition, like: static constexpr auto make_value_to_char1() { constexpr auto N = sizeof...(alphabet_types); return N; } makes it go away.