-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[math] Don't #include "Math/Error.h"
and "Math/Util.h"
in Minuit2 headers
#13646
Conversation
Starting build on |
#include "Math/Error.h"
in mathcore headers used by Minuit2#include "Math/Error.h"
and "Math/Utils.h"
in mathcore headers used by Minuit2
#include "Math/Error.h"
and "Math/Utils.h"
in mathcore headers used by Minuit2#include "Math/Error.h"
and "Math/Utils.h"
in Minuit2 headers
Build failed on mac11/noimt. Errors:
|
#include "Math/Error.h"
and "Math/Utils.h"
in Minuit2 headers#include "Math/Error.h"
and "Math/Util.h"
in Minuit2 headers
21e37dd
to
466258e
Compare
The "Math/Error.h" header is not shipped with standalone Minuit2. It is not a perfect solution to just ship it with Minuit2, because the Error.h header behaves differently depending on the `MATHCORE_STANDALONE` macro being defined or not. The code would only work correctly if the user defines the `MATHCORE_STANDALONE` herself in the user code that uses standalone Minuit2, which would be annoying. Instead, this commit proposes another solution to the problem: for all headers also used in Minuit2 standalone, MathCore moves the definitions of all functions that use `Math/Error.h` out of the header files in the cxx files. Like this, the `Math/Error.h` is only a build dependency of standalone Minuit2, and the user doesn't need to define the `MATHCORE_STANDALONE` macro for it to work. Including the "Math/Util.h" header needs to be avoided for similar reasons (it's about another preprocessor macro related to `veccore`).
Starting build on |
Build failed on mac11/noimt. Errors:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you for fixing this!
The "Math/Error.h" header is not shipped with standalone Minuit2.
It is not a perfect solution to just ship it with Minuit2, because the Error.h header behaves differently depending on the
MATHCORE_STANDALONE
macro being defined or not. The code would only work correctly if the user defines theMATHCORE_STANDALONE
herself in the user code that uses standalone Minuit2, which would be annoying.Instead, this commit proposes another solution to the problem: for all headers also used in Minuit2 standalone, MathCore
moves the definitions of all functions that use
Math/Error.h
out of the header files in the cxx files. Like this, theMath/Error.h
is only a build dependency of standalone Minuit2, and the user doesn't need to define theMATHCORE_STANDALONE
macro for it to work.Including the "Math/Util.h" header needs to be avoided for similar reasons (it's about another preprocessor macro related to
veccore
).