From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BDDC63849AD7; Wed, 24 Apr 2024 07:42:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDDC63849AD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713944524; bh=GbIa5ln86p8VjN89meamtJjRLnkneTgNov89adcbSEM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=e7j8LKto2/JlPG3LWxSSS653IhTlir4kL4ePvMX3yl0uPhtV7eXcvgz5f/NE0S+sM PFktEAP+JRgYKOMzMjr/jAq/GUtvsK6J2jnuuyvW2COt2PPa4ZHlfWIKlaO3zGycnK fWcw2wjdS/ldOTY1XnrAxCSrl3ZLbVmBfU8j8Y3A= From: "gcc-90 at tbilles dot hu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94061] defaulted member operator <=> defined as deleted if a base has protected member operator <=> Date: Wed, 24 Apr 2024 07:42:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc-90 at tbilles dot hu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94061 Tibor Billes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gcc-90 at tbilles dot hu --- Comment #5 from Tibor Billes --- I ran into this problem, I found a detailed stackoverflow discussion that explains that the standard mandate the derived to base conversion mentioned earlier in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94061#c2 It says that the list of subobjects are "formed by a sequence of derived-to-base conversions, class member access expressions, and array subscript expressions applied to x". (https://timsong-cpp.github.io/cppwp/n4868/class.compare.default#6.sentence= -3) I'm not a C++ language lawyer, just wanted to provide additional information for anyone looking for this problem. And yeah, I also wish this would work.. Here is the stackoverflow discussion with all the good references to the specific sections of the standard: https://stackoverflow.com/questions/73055625/deriving-class-with-protected-= equality-operator-results-in-deleted-default=