The G4EmSaturation API allows for sub-classing to provide different parameterizations for scintillation photon yield. However, the G4EmSaturation base class includes two methods of the same name (VisibleEnergyDeposition) but with different prototypes. One is declared virtual and is intended to be overloaded while the other is not virtual and code comments specifically state that it should not be overloaded. In the C++ standard, overloading a method in a derived class hides all methods of the same name in the base class; so this API design does not work. Since the non-overloaded prototype is used within the G4Scintillation process, without a work around, compilation fails. Aapplication or toolkit developers can work around this issue by either re-implementing the required VisibleEnergyDeposition prototype in the sub-class (cut-and-paste) or including a 'using G4EmSaturation::VisibleEnergyDeposition' directive in the definition of the sub-class. However, an update to the API to eliminate the need for a work-around seems warranted.
Hello, thank you very much for the report. VI
Hello, the problem is fixed and the fix will be available for the next patch to Geant4 10.2. We choose a simple solution to rename inline method. VI