I have recently been reading up on some of the C++20 features and been particularly interested in playing with concepts. I decided to get the source code of the latest LLVM 10.0.0 off of git so that I could compile it following the guide here and get the latest clang, the associated OpenMP implementation, and some other things. To help with developing in Xcode, I also built the project using the -DLLVM_CREATE_XCODE_TOOLCHAIN=ON so it would produce a Toolchain output I could use in Xcode.
The build process went fine and it generated the desired products like clang++, libomp, the Xcode Toolchain, etc. I switched to the LLVM generated toolchain in Xcode, after restarting Xcode, updated the build settings like the C++ dialect being c++20, and I have noticed a couple things. First, the following basic sample code compiles and runs successfully:
template <typename T>
concept always_satisfied = true;
int main(int argc, char** argv){
std::cout << "Success" << std::endl;
return 0;
}
However, the annoying thing with Xcode is that the IDE is flagging the concept always_satisfied = true line as an error, as shown in the below image, implying that Xcode cannot recognize the C++20 keyword concept or something along those lines.
How can I fix this problem? I have tried clearing my DerivedData/ for the project to see if that might help, since I have read some problems like this being resolved in the past with this fix, yet it still has not resolved the situation.
