From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06D213858437; Sat, 5 Nov 2022 14:01:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06D213858437 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667656905; bh=JoXnF+n/ewr3XnClwEYhJ3u15FujdWAqKNMyJ53udKM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K7Cu3BbyRIYKsel0JjuaS1CqCmcrd8FVGEmNGH90ionIVw/bt9gRPA7Z6LJlNLZd0 uQgMTkYtmsiuBiLQowTOOXdn4dKCikXBhU8j8a1Z+P62jZrG1j+LWA4CPgzKkfrAZs zrhaay4HR8RuSePudaQKu/B0Ma9OT/TbtfOUwEaM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107525] propagate_const should not be using SFINAE on its conversion operators Date: Sat, 05 Nov 2022 14:01:43 +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: 12.2.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi 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=3D107525 --- Comment #10 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:7c6008e75df80607f8104e665e0448a0a9cbf85a commit r13-3695-g7c6008e75df80607f8104e665e0448a0a9cbf85a Author: Jonathan Wakely Date: Fri Nov 4 15:05:41 2022 +0000 libstdc++: Do not use SFINAE for propagate_const conversions [PR107525] As the PR notes, the current conversion operators are defined as function templates so that we can use SFINAE. But this changes how they are considered for overload resolution. This moves those operators into base classes that can be specialized so the operators are obsent unless the constraints are satisfied. libstdc++-v3/ChangeLog: PR libstdc++/107525 * include/experimental/propagate_const (operator element_type*(= )): Move into base class that can be partially specilized to iompose constraints. (operator const element_type*()): Likewise. * testsuite/experimental/propagate_const/observers/107525.cc: N= ew test.=