https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106784
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:be4b32b9ef69b86b662cb7511b48cd1048a55403 commit r13-2879-gbe4b32b9ef69b86b662cb7511b48cd1048a55403 Author: Marek Polacek <pola...@redhat.com> 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.