]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Heterogeneous std::pair comparisons [PR113386]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 15 Jan 2024 14:47:52 +0000 (14:47 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 15 Apr 2024 18:26:09 +0000 (19:26 +0100)
commit2a0c083558b4ac6609692294df7a388cf4468711
treea10220c5457b8f0b6210d04438de4876e8212db4
parent2d694414ada8e3b58f504c1b175d31088529632e
libstdc++: Heterogeneous std::pair comparisons [PR113386]

I'm only treating this as a DR for C++20 for now, because it's less work
and only requires changes to operator== and operator<=>. To do this for
older standards would require changes to the six relational operators
used pre-C++20.

libstdc++-v3/ChangeLog:

PR libstdc++/113386
* include/bits/stl_pair.h (operator==, operator<=>): Support
heterogeneous comparisons, as per LWG 3865.
* testsuite/20_util/pair/comparison_operators/lwg3865.cc: New
test.
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/testsuite/20_util/pair/comparison_operators/lwg3865.cc [new file with mode: 0644]