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

More exhaustive feature test macro checks #2545

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

joshessman-llnl
Copy link
Contributor

This was discovered when using a compiler that supports if constepxr but not automatic return type deduction, which is used by the get function defined within this block. I was able to mitigate this by adding a check to make sure automatic return type deduction was also supported.

@alexezeder
Copy link
Contributor

Do you still have access to this compiler? I'm asking because, as far as I can see, it won't pass the compile-test since there is the same check:

#ifdef __cpp_if_constexpr

and it's unmodified in this PR.
Also, there are other usages of this feature macro in compile.h:
#ifdef __cpp_if_constexpr

#ifdef __cpp_if_constexpr

that probably should also be changed since they depend on each other.

@joshessman-llnl
Copy link
Contributor Author

Thanks for pointing this out! I was able to extend the conditional blocks mentioned above and ran into another bug in Intel (minimal example here) that I went ahead and added a patch for.

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Looks good but please address minor inline comments.

include/fmt/os.h Outdated Show resolved Hide resolved
include/fmt/os.h Outdated Show resolved Hide resolved
@alexezeder
Copy link
Contributor

alexezeder commented Oct 14, 2021

I can also suggest regrouping changes to 2 commits differently than it's done now - the first one for all if constepxr changes, the second just for the Intel compiler bug, since these two fixes are unrelated.

@joshessman-llnl
Copy link
Contributor Author

I can also suggest regrouping changes to 2 commits differently than it's done now - the first one for all if constepxr changes, the second just for the Intel compiler bug, since these two fixes are unrelated.

Good suggestion, the two changes have been moved into their own commits.

@vitaut vitaut merged commit febdef4 into fmtlib:master Oct 14, 2021
@joshessman-llnl joshessman-llnl deleted the fix/intel_19_feature_tests branch October 14, 2021 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants