From 120d132dd0375d4ffed1375c8f29a3274426cdbc Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Tue, 19 Feb 2013 19:28:02 +0000 Subject: [PATCH] Fix to compile with gcc46 --- DDCore/include/DD4hep/Factories.h | 12 ++++-------- DDG4/include/DDG4/Factories.h | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/DDCore/include/DD4hep/Factories.h b/DDCore/include/DD4hep/Factories.h index 7527bbe5d..9633d7f84 100644 --- a/DDCore/include/DD4hep/Factories.h +++ b/DDCore/include/DD4hep/Factories.h @@ -195,26 +195,22 @@ namespace { #define DECLARE_XMLELEMENT(name,func) \ namespace DD4hep { namespace Geometry { namespace { struct xml_element_##name {}; } \ - using DD4hep::Geometry::xml_element_##name; \ - template <> DD4hep::Geometry::Ref_t XMLElementFactory<xml_element_##name>::create(DD4hep::Geometry::LCDD& l,const XML::Handle_t& e) {return func(l,e);} }}\ + template <> DD4hep::Geometry::Ref_t XMLElementFactory<DD4hep::Geometry::xml_element_##name>::create(DD4hep::Geometry::LCDD& l,const DD4hep::XML::Handle_t& e) {return func(l,e);} }}\ PLUGINSVC_FACTORY_WITH_ID(xml_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*)) #define DECLARE_XML_DOC_READER(name,func) \ namespace DD4hep { namespace Geometry { namespace { struct xml_document_##name {}; } \ - using DD4hep::Geometry::xml_document_##name; \ - template <> long XMLDocumentReaderFactory<xml_document_##name>::create(DD4hep::Geometry::LCDD& l,const XML::Handle_t& e) {return func(l,e);} }}\ + template <> long XMLDocumentReaderFactory<DD4hep::Geometry::xml_document_##name>::create(DD4hep::Geometry::LCDD& l,const DD4hep::XML::Handle_t& e) {return func(l,e);} }}\ PLUGINSVC_FACTORY_WITH_ID(xml_document_##name,std::string(#name "_XML_reader"),long(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*)) #define DECLARE_DETELEMENT(name,func) \ namespace DD4hep { namespace Geometry { namespace { struct det_element_##name {}; } \ - using DD4hep::Geometry::det_element_##name; \ - template <> DD4hep::Geometry::Ref_t DetElementFactory<det_element_##name>::create(LCDD& l,const XML::Handle_t& e,SensitiveDetector& s){return func(l,e,s);}}}\ + template <> DD4hep::Geometry::Ref_t DetElementFactory<DD4hep::Geometry::det_element_##name>::create(LCDD& l,const DD4hep::XML::Handle_t& e,SensitiveDetector& s){return func(l,e,s);}}}\ PLUGINSVC_FACTORY_WITH_ID(det_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*,DD4hep::Geometry::SensitiveDetector*)) #define DECLARE_SUBDETECTOR(name,func) \ namespace DD4hep { namespace Geometry { namespace { struct det_element_##name {}; } \ - using DD4hep::Geometry::det_element_##name; \ - template <> DD4hep::Geometry::Ref_t DetElementFactory<det_element_##name>::create(DD4hep::Geometry::LCDD& l,const XML::Handle_t& e,SensitiveDetector&){return func(l,e);}}}\ + template <> DD4hep::Geometry::Ref_t DetElementFactory<DD4hep::Geometry::det_element_##name>::create(DD4hep::Geometry::LCDD& l,const DD4hep::XML::Handle_t& e,SensitiveDetector&){return func(l,e);}}}\ PLUGINSVC_FACTORY_WITH_ID(det_element_##name,std::string(#name),TNamed*(DD4hep::Geometry::LCDD*,const DD4hep::XML::Handle_t*,DD4hep::Geometry::SensitiveDetector*)) #endif // DD4HEP_FACTORIES_H diff --git a/DDG4/include/DDG4/Factories.h b/DDG4/include/DDG4/Factories.h index 1fc0ee131..df7827813 100644 --- a/DDG4/include/DDG4/Factories.h +++ b/DDG4/include/DDG4/Factories.h @@ -100,7 +100,6 @@ namespace { #define DECLARE_GEANT4_SETUP(name,func) \ namespace DD4hep { namespace Simulation { namespace { struct xml_g4_setup_##name {}; } \ - using DD4hep::Simulation::xml_g4_setup_##name; \ - template <> long Geant4SetupAction<xml_g4_setup_##name>::create(LCDD& l,const DD4hep::Simulation::Geant4Converter& e, const std::map<std::string,std::string>& a) {return func(l,e,a);} }} \ + template <> long Geant4SetupAction<DD4hep::Simulation::xml_g4_setup_##name>::create(LCDD& l,const DD4hep::Simulation::Geant4Converter& e, const std::map<std::string,std::string>& a) {return func(l,e,a);} }} \ PLUGINSVC_FACTORY_WITH_ID(xml_g4_setup_##name,std::string(#name "_Geant4_action"),long(DD4hep::Geometry::LCDD*,const DD4hep::Simulation::Geant4Converter*,const std::map<std::string,std::string>*)) #endif // DDG4_FACTORIES_H -- GitLab