This repository was archived by the owner on Jan 7, 2023. It is now read-only.
Fix compatibility with root_numpy and libc++. #118
Merged
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.
Two header files (Column.h and BetterChain.h) contained 'using namespace
std;' directives. Not only is this bad practice for C++ header files,
but it also causes compatibility issues with Cython-generated C++ code
when compiling against libc++ (e.g. on Mac OS X 10.9). The issue arises
due to Cython utility functions using non-namespaced C stdlib functions
(e.g. isspace). When these two root_numpy headers were included, they
caused an amiguity error by exposing 's std::isspace method.
This seems to not have been an issue with GNU libstdc++, but libc++'s
more strict adherence to standards did not like this.
The solution here is simply to prefix all std::-namespace symbols in
these two headers and remove the 'using namespace std;' directives.
One might argue that Cython should std::-prefix their function use, but
the reality is that their routines still need to support C, and their
routines do work if users don't pull in the entire std:: C++ namespace,
so I don't think this is worth commenting about upstream.