libstdc++: Reverse arguments in constraint for std::optional's <=> [PR104606]
commit7f65d8267fbfd19cf21a3dc71d27e989e75044a3
authorJonathan Wakely <jwakely@redhat.com>
Wed, 27 Mar 2024 21:51:13 +0000 (27 21:51 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 3 Apr 2024 10:45:35 +0000 (3 11:45 +0100)
tree9330cb9c83b0b7b7f77bc2316bc5ced9b894630c
parentb2460d621efe740bd95ad41afef6d806ec1bd9c7
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.
libstdc++-v3/include/std/optional
libstdc++-v3/testsuite/20_util/optional/relops/104606.cc [new file with mode: 0644]