I also had problems with std::function
and Swift. It turns out Clang blocks are interoperable with both std::function
and Swift closures, so I ended up adding a thin C++ layer that accepts Clang blocks and just forwards those.
2 Likes