From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AFCAD3857817; Mon, 26 Sep 2022 16:42:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFCAD3857817 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664210545; bh=fuLOvx2e8I0Vx06Khx/EXzjxrudhzOw7M4WQrUt/M3o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oiPT8+IysMol6v55c5Ntz5yjd0p3XOUN0zc86+yCldC5IctX3JfKAJHUlj8RLHTrc qTuHyyi15Gq4MVR/uaIWu4vy5am23hXo/ds9T4RMbNnOsGmW3tTS74Dyq32lfLWJPe hi+rMzuRj/tAqS8MBw3nMUdo356nNTBdncqOnvfI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106784] Add __is_convertible built-in Date: Mon, 26 Sep 2022 16:42:25 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek 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=3D106784 --- Comment #7 from CVS Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:be4b32b9ef69b86b662cb7511b48cd1048a55403 commit r13-2879-gbe4b32b9ef69b86b662cb7511b48cd1048a55403 Author: Marek Polacek Date: Mon Sep 26 10:21:38 2022 -0400 c++: Instantiate less when evaluating __is_convertible Jon reported that evaluating __is_convertible in a test led to instantiating something ill-formed and so we failed to compile the test. __is_convertible doesn't and shouldn't need to instantiate so much, so let's limit it with a cp_unevaluated guard. Use a helper function to implement both built-ins. PR c++/106784 gcc/cp/ChangeLog: * method.cc (is_convertible_helper): New. (is_convertible): Use it. (is_nothrow_convertible): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/is_convertible3.C: New test. * g++.dg/ext/is_nothrow_convertible3.C: New test.=