Fail to build with LLVM clang++ 20 due to missing template argument list
I tried to build Paraview (and through this, VTK-m) with the LLVM compilers (clang, clang++) from recent LLVM git soruces (main branch).
In VTK-m (git rev. a2784a96) I get the following error:
/home/hakostra/MGLET/paraview/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/VariantImplDetail.h:734:53: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
734 | return VariantCases<NumCases - 8>::template CastAndCall(
|
A workaround is to set the flag -Wno-missing-template-arg-list-after-template-kw
. I believe this is an intentional change in LLVM that will make it into version 20, ref. this LLVM issue. I cannot say if there are several build errors of the same kind after this point in the build process.
The compiler version is:
$ clang++ --version
clang version 20.0.0git (https://github.com/llvm/llvm-project.git dfc40650eccef9ec9a317e7cfe65d9d4fc8fe618)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm/llvm-project/install/bin