AK: Support capturing Objective-C block closures in AK::Function
With a bit of gnarly preprocessor and if constexpr magic, we can get this to work the same way-ish that libc++'s std::function handles block closures.
cc @bugaevc , in case you have any objective-c wisdom :)
/home/runner/work/ladybird/ladybird/AK/StdLibExtraDetails.h:148:43: error: blocks support disabled - compile with -fblocks or pick a deployment target that supports them 148 | inline constexpr bool IsBlockClosure<Ret (^)(Args...)> = true;
Oh great. Are we going to have to build our entire project with -fblocks on linux? Do distros even ship clang with block support and BlockRuntime enabled in compiler-rt?
Oh and GCC doesn't support blocks at all, let alone ARC. So I guess adopting this patch would need some serious ifdef surgery to pretend blocks don't exist on gcc, or finally pull the trigger on dropping gcc :/