When applying !114 (merged), Geant4 fails the build.
This MR fixes the few C++20 errors.
Note: this is based !114 (merged)
/cc @gcorti @witoldp