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
Problem with "using namespace std" in generated dictionary files #6343
Projects
Milestone
Comments
Axel-Naumann
added a commit
to Axel-Naumann/root
that referenced
this issue
Nov 20, 2020
`using namespace std` can have detrimental side effects on user headers. Assume that they are compilable, given that they will be included in the dictionary source. Given this, move the using directive after the inclusion of user headers, to not affect them, but only the generated dictionary source code (CINT-compatible std-less type names etc).
Axel-Naumann
added a commit
to Axel-Naumann/root
that referenced
this issue
Nov 24, 2020
`using namespace std` can have detrimental side effects on user headers. For non-ACLiC invocations, assume that user headers are compilable. In those casesm move the using directive after the inclusion of user headers, to not affect them, but only the generated dictionary source code (which is using CINT-compatible std-less type names etc).
Axel-Naumann
added a commit
to Axel-Naumann/root
that referenced
this issue
Mar 18, 2021
`using namespace std` can have detrimental side effects on user headers. For non-ACLiC invocations, assume that user headers are compilable. In those casesm move the using directive after the inclusion of user headers, to not affect them, but only the generated dictionary source code (which is using CINT-compatible std-less type names etc).
Axel-Naumann
added a commit
to Axel-Naumann/root
that referenced
this issue
Mar 22, 2021
`using namespace std` can have detrimental side effects on user headers. For non-ACLiC invocations, assume that user headers are compilable. In those casesm move the using directive after the inclusion of user headers, to not affect them, but only the generated dictionary source code (which is using CINT-compatible std-less type names etc).
Axel-Naumann
added a commit
that referenced
this issue
Mar 22, 2021
`using namespace std` can have detrimental side effects on user headers. For non-ACLiC invocations, assume that user headers are compilable. In those casesm move the using directive after the inclusion of user headers, to not affect them, but only the generated dictionary source code (which is using CINT-compatible std-less type names etc).
Axel-Naumann
added a commit
to Axel-Naumann/root
that referenced
this issue
Mar 23, 2021
`using namespace std` can have detrimental side effects on user headers. For non-ACLiC invocations, assume that user headers are compilable. In those casesm move the using directive after the inclusion of user headers, to not affect them, but only the generated dictionary source code (which is using CINT-compatible std-less type names etc). (cherry picked from commit df98daa)
Axel-Naumann
added a commit
that referenced
this issue
Mar 29, 2021
`using namespace std` can have detrimental side effects on user headers. For non-ACLiC invocations, assume that user headers are compilable. In those casesm move the using directive after the inclusion of user headers, to not affect them, but only the generated dictionary source code (which is using CINT-compatible std-less type names etc). (cherry picked from commit df98daa)
Fixed in master and the upcoming v6.24/00. Is this enough for you or do you also need this in v6.22/10? |
nicknagi
pushed a commit
to nicknagi/root
that referenced
this issue
Mar 30, 2021
`using namespace std` can have detrimental side effects on user headers. For non-ACLiC invocations, assume that user headers are compilable. In those casesm move the using directive after the inclusion of user headers, to not affect them, but only the generated dictionary source code (which is using CINT-compatible std-less type names etc).
6.24/00 is fine. thanks Axel! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the autogenerated dictionary sources I see
(this is from 6.14.08. 6.22.02 has a slightly different comment of
The generated code does not explicitly qualifies STL entities
(sic), but still does theusing...
)This is placed very early on, even before the include of the header files passed as arguments.
Unfortunately, this causes problems, specifically when one of those header files pulls in Kokkos core headers, and there's a name clash with
rank
which is a free function in the kokkos namespace, and std::rank.Is there any way to make the
using namespace
appear AFTER the include of the user header files instead of before?If I manually edit the generated file, and move the
using namespace
to after the includes, it compiles fine.FWIW, the actual compilation is done with nvcc 11, and c++17.
thanks, Charles.
The text was updated successfully, but these errors were encountered: