[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 27 05:28:51 PST 2024
erichkeane wrote:
> Indeed, replacing the lambda with a user declared struct with the same `operator()` works: https://godbolt.org/z/8GWv6d88K
>
> May I try to see if I find a way to delay the instantiations of lambda call operators?
This is unfortunately a sizable amount of work. We're not supposed to instantiate into the body of a lambda call operator until it is called (meaning, at all!). This is a fairly large amount of work that is on my 'things to do when I have a ton of time' list. I did the bare basics of it at one point to show another patch author how to 'start', and it is similar to the 'deferred concept instantation' (or delayed?) work that I did about 3 years ago.
You're welcome to try, and that is seemingly the right way forward here, but it is not for the feint of heart.
https://github.com/llvm/llvm-project/pull/117167
More information about the cfe-commits
mailing list