From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8B937385840E; Sat, 27 Jan 2024 17:24:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B937385840E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706376296; bh=1XXLxukd8U1KebaB8aAkzPwly/CutFXtYT6oMHNK100=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rswr26n457janK+M8ZCjhnpR+6upGgsb8TBRv34v+Z2BR/wR0iwqJVByFLa2pKhpH 6AKqgUESWEp7f/8d027e2XeWNZOXQcNCBCY1UBZIGyxCslTxhnab4fekPMzE+Zxp7g YP3iH3YK/5aMbWtELMcRfeu7rmY+n6PRYe7JxcX0= From: "hewillk at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113629] 'deducing this' does not work with conversion operators Date: Sat, 27 Jan 2024 17:24:55 +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: hewillk at gmail dot com 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 #2 from =E5=BA=B7=E6=A1=93=E7=91=8B = --- more reduced: struct Base { operator int(this auto&&) { return 42; } }; int main() { Base b; // return static_cast(Base{}); // ok return static_cast(b); // error } https://godbolt.org/z/qGrbf4rj7=