https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101427
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- The std::get<T> code stopped working as a result of r11-4693 which implemented a core language change: c++: DR2303, ambiguous base deduction [PR97453] When there are two possible matches and one is a base of the other, choose the derived class rather than fail. We should have had a libstdc++ test verifying the expected error, so that we'd have noticed the library regression. I will push the fix soon.