Switch to C++20 and replace std::enable_if with template constraints

It's about time we switch to C++20. I believe the only compiler that Walberla still supports that doesn't support C++20 is nvcc from CUDA < 12, but there is no reason to run anything that old anymore: The newest CUDA driver that only supported CUDA 11 is well past any long-term support and has plenty of known security vulnerabilities.

One C++20 feature I have come to appreciate is template constraints (i.e. the requires keyword) which can replace std::enable_if. It makes the code more legible and leads to much nicer error messages when you try to use a disabled function/class.

Before this merge request can be merged, some build images will need to be updated from CUDA 11 to CUDA 12. Depends on !739 (merged).

Edited by Michael Kuron

Merge request reports

Loading