-
Notifications
You must be signed in to change notification settings - Fork 69
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
unstdify config.hpp macros #366
base: stable
Are you sure you want to change the base?
Conversation
@@ -15,21 +15,25 @@ | |||
//@HEADER | |||
#pragma once | |||
|
|||
#ifndef __has_include | |||
# define __has_include(x) 0 | |||
#ifndef MDSPAN_IMPL_HAS_INCLUDE |
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.
I switched this to our own macro rather than substituting in the standard one (since I think that could propagate a bug downstream if someone does #ifdef __has_include
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.
This is much better; thank you! : - )
# endif | ||
#endif | ||
|
||
#ifndef __has_cpp_attribute | ||
# define __has_cpp_attribute(x) 0 | ||
#ifndef MDSPAN_IMPL_HAS_CPP_ATTRIBUTE |
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.
Same here
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.
We shouldn't just remove the leading underscore, we need to inject something to denote that these macros are private, along the lines of what we do in Kokkos with the KOKKOS_IMPL_ prefix
@dalg24 ok, I can do |
I used the bugprone-reserved-identifier clang-tidy check to find these, and a global search/replace to fix them. I kept these changes isolated to ones declared in config.hpp and plan on doing more later. (As you can see, even just the config.hpp ones touch basically every file)