Blocks, and lambdas, and clang... oh my.
The Block type extention introduced by Apple seems to be broken, buggy, and all around horrible. Can we exploit it?
You need CMake >= 3.15
sudo apt-get install llvm
sudo apt-get install clang
sudo apt-get install libblocksruntime-dev
cmake -D CMAKE_CXX_COMPILER=clang++ ..
cmake --build .
cmake ..
cmake --build .
Build the llvm-project (and clang along with it):
https://clang.llvm.org/get_started.html
cd blockhead/cpp
Run...
clang++ -fblocks main.cpp -o blockhead_cpp.exe
Puzzle over why it will not link.