From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5EA63850877; Thu, 29 Sep 2022 10:42:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5EA63850877 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664448178; bh=UEv8cRbaaTa6YfksY9eoa7kgR6tWsXTJpZ5BA42xdXI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gyCT8OqSGHzVbRuTp7hbf989zIDSfS8lv8CV8l5CaRYgdOsH3PvwPw6hcxjU2g+Hk +e8RrLt8MN24Hj6C6EhmzM3ARt4XPEtQtjJuMzZk5tUvIq4wjlXhauv3aoRb+Y4coH XGSRllIkQ2Dzjo1jFXPQP3FoehJhYUPxYxWuHoEw= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107085] __reference_constructs_from_temporary does not detect static up-cast Date: Thu, 29 Sep 2022 10:42:58 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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: 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=3D107085 --- Comment #1 from Jonathan Wakely --- You can't bind a non-const Base& to a Derived prvalue, so this seems correc= t. The reference doesn't bind to it at all, so it doesn't bind to a temporary.=