-
Notifications
You must be signed in to change notification settings - Fork 17
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
Move all include statements outside of namespaces #30
Open
Irubataru
wants to merge
5
commits into
usqcd-software:master
Choose a base branch
from
Irubataru:pull-requests/include-issue
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Move all include statements outside of namespaces #30
Irubataru
wants to merge
5
commits into
usqcd-software:master
from
Irubataru:pull-requests/include-issue
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is necessary due to the fact that it breaks the C++ standard (see item 20.5.2.2.3). This can and will therefore sometime lead to compilation errors.
One should in general not have includes inside of namespaces unless strictly necessary (which it isn't in this case).
Hi Balint, Yes, I have built chroma based on all of my recent USQCD pull requests. I built chroma with the following options for configure:
I also am limited in time, and can't really go through all that many combinations of settings. Cheers, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First, sorry about closing the previous pull request. I wanted to submit a second one and therefore thought I should make dedicated branches for each PR. Continuing with the original PR message:
This fix is an attempt at cleaning up the include structure of your code as well as removing any "using namespace..." from header files which might leak into library user's code.
Most important is the first commit f232ad4 which moves all standard library headers outside of the QDP namespace. This is very important as it is in direct conflict with the C++ standard (see [library.using.headers] item 3), and will therefore not compile on all compilers (e.g. gcc 7.2.0 which is what I am using).
The remaining commits is an attempt at forcing this rule for all QDP headers as well. This compiles and runs for me using configuration flags
where QMP is compiled using MPI communication and not threads. I believe some additional testing is in order, but you will know the different targets better than I, and will therefore be able to do these tests more thoroughly.