https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94562
--- Comment #2 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:f5fa62ed19a1c85cda920bbe05eb075d8f2a0b42 commit r10-7725-gf5fa62ed19a1c85cda920bbe05eb075d8f2a0b42 Author: Jonathan Wakely <jwak...@redhat.com> Date: Tue Apr 14 21:54:55 2020 +0100 libstdc++: Add comparison operators to std::shared_ptr (PR 94562) This also implements the proposed resolution to LWG issue 3247, so that the ill-formed <=> expression with nullptr is not used. PR libstdc++/94562 * include/bits/shared_ptr.h (operator<=>): Define for C++20. * include/bits/shared_ptr_base.h (operator<=>): Likewise. * include/bits/unique_ptr.h (operator<=>): Add inline specifier. * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test. * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect std::less<A*> to be used when comparing std::shared_ptr<A> objects in C++20.