From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8E8E43864C56; Tue, 28 May 2024 11:00:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E8E43864C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716894045; bh=xWCiYkHNtyw+nJShkSpj1UjjgC9ZKpp3l1PMjVO6My0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S8AXIosH+XAKjagFYY/TRnCV3hHUfRd20G6sS72o3ib0Md4j60zboZQdgGIWolN7i 6m9MHfDQaoJM4ioaxOZo3GWbme7Q9ZclJB3c4R+zxUNouVyeog0rfSnBJQtm1yeqOI 9eiomA7OAJN+iqoKfsuqmq6vYOPYtVTkLgCJ7x0Y= From: "olaf.krzikalla at dlr dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115216] operator auto() gets instantiatied too eagerly Date: Tue, 28 May 2024 11:00:45 +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.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olaf.krzikalla at dlr dot de 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=3D115216 --- Comment #3 from Olaf Krzikalla --- (In reply to Andrew Pinski from comment #2) > MSVC and ICC (EDG in GCC compat mode) also rejects the code for the same > reason as GCC. Are you sure this is not a clang issue? To be honest I don't know. I have no idea, if a compiler is allowed to conv= ert a type before applying a operator, if there is already such an operator available in the genuine class. Someone who knows the respective details in= the standard is required.=