[libcxx-commits] [clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

Younan Zhang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 8 07:23:40 PST 2025


zyn0217 wrote:

I see the problem here:

When substituting into the constraint __is_derived_from_optional with [_Tp = __sfinae_assign_base] prior to substituting the three-way operator, we must also substitute into the lambda call expression. This requires instantiating the lambda body to deduce its return type, and instantiating the lambda body necessitates mangling its parent for Microsoft mangling. In this case, the lambda resides within the function declaration `compare_three_way_result_t<_Tp, _Up> operator<=>(_Tp, _Up)`, which remains uninstantiated at this point!

@cor3ntin

https://github.com/llvm/llvm-project/pull/102857


More information about the libcxx-commits mailing list