|
[Rivet] FastJet and C++11 againAndy Buckley andy.buckley at cern.chThu Mar 17 12:51:59 GMT 2016
Hi FastJetters, Several months ago I was in touch to ask if it would be possible to issue a patch release of FastJet to "fix" the slew of compiler warnings that appear when FastJet -- or, crucially, code which includes its headers -- is compiled with GCC using the C++11 standard. These warnings are arguably overzealous, and I agree with the arguments made to add a suppression flag in this support request: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59325 But the developers seem to have little sympathy for that argument and so we are stuck with extremely verbose compiler output every time one of the FastJet uses of auto_ptr is spotted. The reason I'm bringing this up again is that previously this was just an internal annoyance for the developers of a project that I was working on, but now we would like to make the switch to mandatory C++11 compilation of Rivet and feel that a slew of misleading FastJet warnings very time a user calls rivet-buildplugin is a blocker for that change. If I remember correctly you are working on a more major development and would rather not spend time on maintaining the current branch. But unless that new version is going to appear pretty soon, a bugfix would be much appreciated -- have the experiments also reported this as an issue? Best wishes, Andy & Rivet PS. I can't resist a technical comment. There are several possible solutions, but on https://gcc.gnu.org/wiki/Cxx11AbiCompatibility it's made clear that mixing C++ standards in a single project is a very bad idea, so maybe a (good?) assumption can be made that user code will never compile different units against FastJet with the same symbol being declared as an auto_ptr in one and as a unique_ptr in another. If so, then a simple "#if C++11 ... #else ..." macro solution would not be crazy. Given that the incompatibility is at ABI level, harder-work approaches like using the PIMPL idiom to hide the smart pointers from the public headers probably wouldn't help. Or you could also decide to make C++11 mandatory ;-) -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |