The latest version of MacOS should have installed C++ for you. But on Linux you may need to update some packages. To ensure you have the latest clang compiler and libraries you can try the follwing...
Could we have one section related to build issues on all OS's and refer to clang?
macOS (This text is under Linux)
Could we have one section related to build issues on all OS's and refer to clang?
Also, do we require clang-15 or is 14 OK?