jvavrek / NIMB2018

G4NRF source code and example applications from Vavrek et al, NIM B (2018)
MIT License
6 stars 1 forks source link

After C++17,throw() function has been repalced by noexcept #7

Closed Tuoxu0315 closed 6 months ago

Tuoxu0315 commented 6 months ago

Dear sir,my g++'s default version is up to C++17 and found that in C2_function.hh/.icc,most lines included "throw()" will cause the make process to crash. Could you pls update the package to avoid such a thing?My great appreciation!

jvavrek commented 6 months ago

Hi @Tuoxu0315, the C2_function files are not my own but are Geant4 source code files bundled here for convenience. I suggest checking out more up-to-date releases of Geant4 to see if they've updated those files.

Tuoxu0315 commented 6 months ago

wow,thanks a lot

jvavrek commented 6 months ago

wow,thanks a lot

Hi @Tuoxu0315, because it's hard to discern sarcasm over text, and because you seem new here, and because I acknowledge my answer wasn't very helpful, and because you seem interested in a field close to my heart, let me offer some additional thoughts:

  1. As mentioned, the C2_function files really do not need to be part of this repo. I added them here because (if I recall correctly) something was weird with the #include paths on my system and I couldn't include them from their intended location in the source tree. If you're going to be using G4NRF, I'm guessing you already have a working, more modern Geant4 installation with C++17-compatible C2_function files. You may be able to #include them properly, or you may need to copy them into your project include/ directory like I did.
  2. The primary purpose of this repo is to document the state of the code at the time of publication, unfortunately not to be a one-click install-and-run simulation.
  3. As you can probably tell by the front page of the repo, I have barely touched this code in six years. I don't think I even have it installed on a system with C++17 or higher, so it would take some amount of work to get set up again. If you are planning to work with it and spend time with it, you are probably in a much better position than I am to be fixing low-level C++ bugs (especially in code I didn't write). Related to (2), you can of course make a fork of the repo---if you fix the bugs on your side I would happily consider a pull request here. (In fact, you will often find this in open source software---the original authors are busy with new projects but welcome contributions.)

Hope that helps!

Tuoxu0315 commented 6 months ago

Sorry for the misunderstandingļ¼ŒI have just joined in this field so dont learn a lot. I will try your advice and try to solve this problem.3Q