From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 209B13858012; Wed, 6 Mar 2024 09:49:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 209B13858012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709718551; bh=iqAI1zb2ipdBOe1EEbBireIws/NMhizMqzdsrgxXrk0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DIYwKQ27Ef8+2iJGB/RKlj6FhvwgksY3UKTzMokyE+qQ1jcG8mgqrTaWSKyg6ESjg 7V6Ukms5qLuCDaBWz/1gv0/9dHWQRqSXG1nVKYpnTAfKFzT87oYZak7CUD4M4s8Mr9 BisOSE6ct147RrRG50bMN5e9CycpEJJYt8Qh23+I= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113629] 'deducing this' does not work with conversion operators Date: Wed, 06 Mar 2024 09:49:09 +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: 14.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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=3D113629 --- Comment #3 from GCC Commits --- The master branch has been updated by Nathaniel Shead : https://gcc.gnu.org/g:49d83e963aa453600088380aebd507e172eb80ad commit r14-9332-g49d83e963aa453600088380aebd507e172eb80ad Author: Nathaniel Shead Date: Wed Mar 6 00:43:22 2024 +1100 c++: Fix template deduction for conversion operators with xobj paramete= rs [PR113629] Unification for conversion operators (DEDUCE_CONV) doesn't perform transformations like handling forwarding references. This is correct in general, but not for xobj parameters, which should be handled "normally" for the purposes of deduction: [temp.deduct.conv] only applies to the return type of the conversion function. PR c++/113629 gcc/cp/ChangeLog: * pt.cc (type_unification_real): Only use DEDUCE_CONV for the return type of a conversion function. gcc/testsuite/ChangeLog: * g++.dg/cpp23/explicit-obj-conv-op.C: New test. Signed-off-by: Nathaniel Shead Reviewed-by: Jason Merrill =