From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB521387689C; Sat, 19 Aug 2023 09:43:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB521387689C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692438198; bh=BSgSfYNb6vyb8887VtHQBR5uuHpRaGpFf6nhRmf0Euw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V3Q4Dh+iWn0oDbLmdpYrBI/3v6thcS7GRVcH4cIO8njL+33/qGu3b45Ig/uWGUp+c NBZZS0WJS5lfZ9vwK0gKmi/k15hPuTav2dadFygTrJ35K98AzyHaFymt4qXjiEJNUW irrWA9FyAYZmcN4ajC7b/MQEnGCytvqgY+78G0CE= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102609] [C++23] P0847R7 - Deducing this Date: Sat, 19 Aug 2023 09:43:17 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D102609 --- Comment #9 from Jonathan Wakely --- If we're right about that, then I agree that a warning would be useful for classes that have no such implicit conversion from S to S*. I think the warning would give a false positive in the case below, so a way= to disable it locally would be needed (e.g. via a diagnostic pragma). struct S { int f(this S*); // warning: explicit object parameter of pointer type can only match if an implicit conversion to S* exists }; struct T : S { operator T*(); }; T t; int i =3D t.f(); // derived class has the required conversion=