https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109277
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Though the code might be undefined ... 20.15.6/5 says: ``` The predicate condition for a template specialization is_convertible<From, To> shall be satisfied if and only if the return expression in the following code would be well-formed, including any implicit conversions to the return type of the function: To test() { return declval<From>(); } [Note: This requirement gives well-defined results for reference types, void types, array types, and function types. — end note] Access checking is performed in a context unrelated to To and From. Only the validity of the immediate context of the expression of the return statement (8.7.3) (including initialization of the returned object or reference) is considered. [Note: The initialization can result in side effects such as the instantiation of class template specializations and function template specializations, the generation of implicitly-defined functions, and so on. Such side effects are not in the “immediate context” and can result in the program being ill-formed. — end note] ``` I am not 100% sure but I suspect this is just ill-formed code which was not rejected before but is now using the builtin rather than the template form ...