|
[Rivet] "#define B0" in system include clashes with Rivet PDGIDStefan Richter stefan.richter at cern.chWed May 2 12:54:30 BST 2018
Dear Rivet developers, I'm experiencing a very annoying compile-time clash because the variable B0 is #defined (to 0) in a header that gets #included in Rivet… where it clashes with Rivet's PDGID definition of the neutral B meson. See the compiler printouts below. Do you have an elegant solution for this? Or should I add an #undef line to the Rivet source? Thank you! Stefan PS: I wish C++ had a module system like Python to prevent this from happening. clang++ -std=c++11 -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -Os -I/Users/stefanrichter/Software/local/src/Rivet-2.5.4/include -I/Users/stefanrichter/Software/local/src/Rivet-2.5.4/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c rivet/core.cpp -o build/temp.macosx-10.13-x86_64-3.6/rivet/core.o -I/Users/stefanrichter/Software/local/include -O2 -Wno-sign-compare -I/Users/stefanrichter/Software/local/include -I/Users/stefanrichter/Software/local/include -I/Users/stefanrichter/Software/local/include -I/opt/local/include In file included from rivet/core.cpp:456: In file included from /Users/stefanrichter/Software/local/src/Rivet-2.5.4/include/Rivet/AnalysisHandler.hh:5: In file included from /Users/stefanrichter/Software/local/src/Rivet-2.5.4/include/Rivet/Config/RivetCommon.hh:20: /Users/stefanrichter/Software/local/src/Rivet-2.5.4/include/Rivet/Tools/ParticleName.hh:122:24: error: expected unqualified-id static const PdgId B0 = 511; ^ /usr/include/sys/termios.h:291:12: note: expanded from macro 'B0' #define B0 0 ^ 1 error generated. error: command 'clang++' failed with exit status 1 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5457 bytes Desc: not available URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20180502/ec3b08d9/attachment.bin>
More information about the Rivet mailing list |