]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Reverse arguments in constraint for std::optional's <=> [PR104606]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 27 Mar 2024 21:51:13 +0000 (21:51 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 2 May 2024 10:57:47 +0000 (11:57 +0100)
commit3d16f8f2aec9583422d00c531732ca9d33e6ef26
tree7891760a2a7039a134c12e533611c7fbbf5ca65a
parent0ae9252f7b52151209b36d8a1cefc49f1b23fa46
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)
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/relops/104606.cc [new file with mode: 0644]