Problem 486

Summary: copy constructor in G4PhysicsVector to be public
Product: Geant4 Reporter: scjohnson
Component: eventAssignee: Makoto.Asai
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 5.1   
Hardware: Other   
OS: Other   

Description scjohnson 2003-05-14 10:43:47 CEST
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.
Comment 1 Gabriele Cosmo 2003-05-21 07:52:59 CEST
Fixed in internal tag "global-V05-01-00".
Will be included in release 5.2. Thanks.