next-exp / nexus

Geant4 simulation framework of the NEXT Collaboration
5 stars 55 forks source link

Use C++-17 in nexus and avoid warnings. #133

Closed paolafer closed 2 years ago

paolafer commented 2 years ago

This PR modifies the SConstruct file to use the 17 standard of C++. This way, a lot of warnings coming from C++14 and C++17 extensions used in GEANT4 are removed.

gondiaz commented 2 years ago

Can you also silence the following warnings? Both were missing at #75

Compiling source/generators/Decay0Interface.cc
source/generators/Decay0Interface.cc:202:16: warning: ‘contains’ is deprecated: Use G4StrUtil::contains instead
      [-Wdeprecated-declarations]
  while (!line.contains(“First event”)) getline(file_, line);
               ^
/Users/gonzalo/Software/Geant4_11/install/include/Geant4/G4String.hh:116:5: note: ‘contains’ has been explicitly marked
      deprecated here
  [[deprecated(“Use G4StrUtil::contains instead”)]]
    ^
1 warning generated.
Compiling source/sensdet/SensorSD.cc
In file included from source/sensdet/SensorSD.cc:10:
source/sensdet/SensorSD.h:77:26: warning: private field ‘boundary_’ is not used [-Wunused-private-field]
    G4OpBoundaryProcess* boundary_; ///< Pointer to the optical boundary process
                         ^
1 warning generated.
paolafer commented 2 years ago

Ok, we can open a new PR with the changes you suggest.