https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104606
--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:80d0f82e6961ff8991897454e2bac126488ea6b9 commit r12-10536-g80d0f82e6961ff8991897454e2bac126488ea6b9 Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Mar 27 21:51:13 2024 +0000 libstdc++: Reverse arguments in constraint for std::optional's <=> [PR104606] This is a workaround for a possible compiler bug that causes constraint recursion in the operator<=>(const optional<T>&, const U&) overload. libstdc++-v3/ChangeLog: PR libstdc++/104606 * include/std/optional (operator<=>(const optional<T>&, const U&)): Reverse order of three_way_comparable_with template arguments. * testsuite/20_util/optional/relops/104606.cc: New test. (cherry picked from commit 7f65d8267fbfd19cf21a3dc71d27e989e75044a3)