c++: implicit operator== adjustments from P2002.
P2002R1, adopted at the February C++ meeting, made several refinements to
the wording for operator<=>. This implements clarifications in how the
implicit operator== is declared: as a duplicate of the operator<=>, with
only the return type and name changed. To that end I factored out the
declaration copying from build_clone.
gcc/cp/ChangeLog:
* cp-tree.h (copy_fndecl_with_name): Declare.
* class.c (copy_fndecl_with_name): Split out from...
(build_clone): ...here.
(add_implicitly_declared_members): Add op== to TYPE_FIELDS.
* method.c (implicitly_declare_fn): Use copy_fndecl_with_name.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/spaceship-synth9.C: New test.