[clang] [clang] The `__reference_meows_from_temporary` builtins should SFINAE friendly when the 1st type is not a reference type (PR #206527)
Nikolas Klauser via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 02:28:52 PDT 2026
philnik777 wrote:
> > IMO this is incorrect. https://eel.is/c++draft/type.traits clearly states that both types have to be complete.
>
> > T is a reference type, and the initialization T t(VAL); is well-formed
>
> If the precondition `T is a reference type` is not satisfied, I think the compiler should not try to instantiation `T t(VAL<U>);`. This is what the PR want to fix.
The precondition is "T and U shall be complete types, cv void, or arrays of unknown bound[.](https://eel.is/c++draft/type.traits#tab:meta.unary.prop-row-48-column-3-sentence-1)".
The check for which this patch disables if the first argument isn't a reference type.
https://github.com/llvm/llvm-project/pull/206527
More information about the cfe-commits
mailing list