https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111172
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:d19bdf8874059457fdfe50a9e14dad8f8b8cecbb commit r14-4012-gd19bdf8874059457fdfe50a9e14dad8f8b8cecbb Author: Jonathan Wakely <jwak...@redhat.com> Date: Tue Sep 12 21:28:38 2023 +0100 libstdc++: Remove non-void static assertions in variant's std::get [PR111172] A void template argument would cause a substitution failure when trying to form a reference for the return type, so the function body would never be instantiated. libstdc++-v3/ChangeLog: PR libstdc++/111172 * include/std/variant (get<T>): Remove !is_void static assertions.