From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E6FA93850402; Mon, 3 Aug 2020 12:58:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6FA93850402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596459525; bh=dKZ1xu/4Oc9aTq8ZvrH8eUk6RUq7YojW0D8k6yqoRM0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Bo7V86AQbJ3DqJqAdetOWvcYFAMzbR3HL5UBtmXCOEwcpdkKpIx7RseOmfle3EIyl GZ8pCd3FQfKtm4J/nbIm6c2+UdRxKp0O+RHNjOYsgn9CmaKJCT+z0iE5J7QiT6EKew EgGQxaepK3yazTkfkNyd6FPOdTljixndBFGW8cdU= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/96416] address_of() is broken by static_assert in pointer_traits Date: Mon, 03 Aug 2020 12:58:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.0 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2020 12:58:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96416 --- Comment #1 from Jonathan Wakely --- I think this is the "correct" behaviour. The specification of pointer_traits::element_type says that if Ptr::element_type isn't valid, and Ptr isn't a template that can be "reboun= d", then "otherwise, the specialization is ill-formed." This explicitly says "the specialization" (meaning pointer_traits itse= lf). Compare this with th rebind member which only says "the instantiation of re= bind is ill-formed".=