Skip to content
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

enumerator value "None" in the "simdize.h" header file of Vc conflicts with the preprocessor macro "None" defined in the X11 header file "X.h" #353

Closed
dkonst13 opened this issue Mar 8, 2023 · 1 comment · Fixed by #354

Comments

@dkonst13
Copy link

dkonst13 commented Mar 8, 2023

During compilation of Geant4 visualization/OpenGL/src/G4OpenGLImmediateXViewer.cc, I encountered an error. It seems that the enumerator value "None" in the "simdize.h" header file of Vc conflicts with the preprocessor macro "None" defined in the X11 header file "X.h".

/usr/include/X11/X.h:

#ifndef None
#define None                 0L /* universal null resource or null atom */
#endif

And include/Vc/common/simdize.h:

enum class Category {
    ///\internal No transformation
    None,
    ///\internal simple Vector<T> transformation
    ArithmeticVectorizable,
    ///\internal transform an input iterator to return vectorized entries
    InputIterator,
    ///\internal transform a forward iterator to return vectorized entries
    OutputIterator,
    ///\internal transform an output iterator to return vectorized entries
    ForwardIterator,
    ///\internal transform a bidirectional iterator to return vectorized entries
    BidirectionalIterator,
    ///\internal transform a random access iterator to return vectorized entries
    RandomAccessIterator,
    ///\internal transform a class template recursively
    ClassTemplate
};

It would be nice if this can be fixed...

Thank you!

@bernhardmgruber
Copy link
Collaborator

Since the concerning enumerator is an internal name of the Vc library, I don't see a big concern renaming it. Alternatively, we can also #undef the macro like we do with some other macro's as well: https://github.com/VcDevel/Vc/blob/1.4/Vc/common/macros.h#L47-L55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants