I am compiling the G4 libraries on OS X. The standard compilation using g++2 works fine, but I wanted to try things in g++3. There are a few errors that pop up, one is when compiling G4GeneralParticleSource. It complains that: /Users/sjohnson/geant4.5.1/source/global/management/include/G4PhysicsVector.hh: In member function `G4PhysicsOrderedFreeVector& G4PhysicsOrderedFreeVector::operator=(const G4PhysicsOrderedFreeVector&)': /Users/sjohnson/geant4.5.1/source/global/management/include/ G4PhysicsVector.hh:152: ` G4PhysicsVector& G4PhysicsVector::operator=(const G4PhysicsVector&)' is protected src/G4GeneralParticleSource.cc:1074: within this context Sure enough, at line 1074 we try to use the copy constructor on a G4PhysicsOrderedFreeVector which inherits from G4PhysicsVector. However, the G4PhysicsVector is declared private. Simply moving the copy constructor in the header file to public solves the problem.
Fixed in internal tag "global-V05-01-00". Will be included in release 5.2. Thanks.