From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7808238654B5; Wed, 22 May 2024 09:03:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7808238654B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716368580; bh=WnFue4FhinpSDsn4Kv6kdX+QBPXDvfGsR3j4IJtc+7A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v9KfBEaEoyMRNByu3W3Z5S+Be/4098VPzEdAH6UIgRQIwxim94UM8o6x3O5eH8E6O hfwucQdMxAyW6iEr5GuMtQ1/FBXaoRixdUmBkYk6R9laReP3UXi1YRGrtP1dDoTZmJ yfPxTHFzgloKVcvInQDeGUvVl+s3k9MYjaxiqQPM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/115145] Help lambda in rewritten std::variant comparisons does not specify return type Date: Wed, 22 May 2024 09:03:00 +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: 15.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=3D115145 --- Comment #1 from GCC Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:b33f44ca6ce2dae7502ce138600e1631ffc9232c commit r15-769-gb33f44ca6ce2dae7502ce138600e1631ffc9232c Author: Jonathan Wakely Date: Tue May 21 15:13:01 2024 +0100 libstdc++: Ensure std::variant relops convert to bool [PR115145] Ensure that the result of comparing the variant alternatives is converted to bool immediately rather than copied. libstdc++-v3/ChangeLog: PR libstdc++/115145 * include/std/variant (operator=3D=3D, operator!=3D, operator<) (operator<=3D, operator>, operator>=3D): Add trailing-return-ty= pe to lambda expressions to trigger conversion to bool. * testsuite/20_util/variant/relops/115145.cc: New test.=