Implement P1946R0, Allow defaulting comparisons by value.
authorJason Merrill <jason@redhat.com>
Tue, 12 Nov 2019 04:57:29 +0000 (23:57 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 12 Nov 2019 04:57:29 +0000 (23:57 -0500)
commitc9cd5c56fd01ea931308dfb6232a01cd5478bd3d
tree4f55345662efee8ad0ae92896a795ee80a048114
parent6e9a85d5052607c8ed31940ce2794323df9463cc
Implement P1946R0, Allow defaulting comparisons by value.

* method.c (early_check_defaulted_comparison): Accept by-value,
reject mixed by-value and by-reference parms.
* decl.c (grokdeclarator): Set funcdef_flag for defaulted friend.
* decl2.c (grokfield): Don't SET_DECL_FRIEND_CONTEXT.

From-SVN: r278078
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/method.c
gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C [new file with mode: 0644]