AIDASoft / DD4hep

Detector Description Toolkit for High Energy Physics
http://dd4hep.cern.ch
GNU Lesser General Public License v3.0
50 stars 99 forks source link

GaudiPluginService and C++17 compatibility #525

Closed petricm closed 5 years ago

petricm commented 5 years ago

Currently we are not C++17 compatible, because std::ptr_fun was removed in 17.

Building CXX object GaudiPluginService/CMakeFiles/DD4hepGaudiPluginMgr.dir/src/PluginService.cpp.o
/Users/lcdci/lcg96/DD4hep/GaudiPluginService/src/PluginService.cpp:52:45: error: no member named 'ptr_fun' in namespace 'std'
                             std::not1(std::ptr_fun<int, int>(std::isspace))));
                                       ~~~~~^
/Users/lcdci/lcg96/DD4hep/GaudiPluginService/src/PluginService.cpp:52:56: error: expected '(' for function-style cast or type construction
                             std::not1(std::ptr_fun<int, int>(std::isspace))));
                                                    ~~~^
/Users/lcdci/lcg96/DD4hep/GaudiPluginService/src/PluginService.cpp:52:61: error: expected '(' for function-style cast or type construction
                             std::not1(std::ptr_fun<int, int>(std::isspace))));
                                                         ~~~^
/Users/lcdci/lcg96/DD4hep/GaudiPluginService/src/PluginService.cpp:59:45: error: no member named 'ptr_fun' in namespace 'std'
                             std::not1(std::ptr_fun<int, int>(std::isspace)))
                                       ~~~~~^
/Users/lcdci/lcg96/DD4hep/GaudiPluginService/src/PluginService.cpp:59:56: error: expected '(' for function-style cast or type construction
                             std::not1(std::ptr_fun<int, int>(std::isspace)))
                                                    ~~~^
/Users/lcdci/lcg96/DD4hep/GaudiPluginService/src/PluginService.cpp:59:61: error: expected '(' for function-style cast or type construction
                             std::not1(std::ptr_fun<int, int>(std::isspace)))
                                                         ~~~^

We did not notice this till now since gcc8 in C++17 mode does not complain about this but Apple clang does.

At this point I would also like to raise the point that the GaudiPluginService has been rewriten to modern C++ and released in Gaudi v30r3 , the current version in v32r0 has even more corrections.

I think it would be good to update the plugin manager.

petricm commented 5 years ago

I think we should still discuss on the next meeting what to do with the pluginmanager

MarkusFrankATcernch commented 5 years ago

This we can. But I do not really want to see boost libraries.