Problem 1867 - Compiler error due to missing include in G4VGFlashSensitiveDetector
Summary: Compiler error due to missing include in G4VGFlashSensitiveDetector
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: parameterisations/gflash (show other problems)
Version: 10.2
Hardware: Apple Mac OS X
: P5 minor
Assignee: Marc.Verderi
URL:
Depends on:
Blocks:
 
Reported: 2016-06-03 13:09 CEST by Laurie Nevay
Modified: 2016-06-20 17:24 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Laurie Nevay 2016-06-03 13:09:57 CEST
G4VGFlashSensitiveDetector.hh relies on G4VSensitiveDetector.hh already being included before - this is a missing include that results in a compiler error.

/Users/nevay/physics/packages/geant4.10.02.p01-install/include/Geant4/G4VGFlashSensitiveDetector.hh:82:13: error: 
      'G4VSensitiveDetector' is an incomplete type
          = dynamic_cast<G4VSensitiveDetector *>(this);

From a C++ point of view, the error is correct.  G4VSensitiveDetector.hh should be included at the top of G4VGFlashSensitiveDetector.hh I believe to allow the dynamic cast.

I'm on Mac OSX 10.11.4, Apple LLVM version 7.3.0 (clang-703.0.29), Geant4.10.2.p01. I found this when alphabetising the includes.
Comment 1 Marc.Verderi 2016-06-20 17:24:06 CEST
Thank you for reporting, this is indeed surprising that no compilers complained about this missing include. This has been fixed in:

gflash-V10-02-00

It is mentioned here that the code involved is rather old, and will be reviewed.