From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D95833858410; Thu, 21 Mar 2024 09:26:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D95833858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711013204; bh=CD6vfhYJNxgHdIkhz7qrPYE3rkgzMbJjc9R6Y+2N6Uw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mTriD3tWK6IDK1Iw+qJF1/JszjBH+FLX8wZOTmI4wiwWzdOUOqnFRjs+gN/otJL5t Nra5kgW4uvJBSII1M0RwkSkV/7og+KjQe4Y4znMhOYsd2V/oDnuEAfa3ZaKA87yqGF VZHPxnnr76Y4QmvQcswpuJve8FFaT8RiADiWjVSw= From: "cvoica at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114410] compiler issue in reference_binding when using rvalue reference to member of const object Date: Thu, 21 Mar 2024 09:26:44 +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: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvoica at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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: 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=3D114410 --- Comment #4 from Cristian VOICA --- I'm also trying to understand another thing.=20 Perhaps you can point me to where to read more about it as I was not expect= ing casting to a non-const reference to work for a member in a const object. Is there a warning for (std::string&)a->m_i on "const A* a" ? Thx!=