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

Enable compilation under C++20 with clang++ and its standard library #1248

Merged
merged 2 commits into from
Feb 2, 2023

Conversation

eddelbuettel
Copy link
Member

When using C++20 with clang++ (version 15) and also adding -stdlib=libc++ to enable use of its standard library,
the removal of std::result_of bites us and compilation fails. This was deprecated in C++17, and removed in C++20. Conditional use of the replacement std::invoke_result works.

Checklist

  • Code compiles correctly
  • R CMD check still passes all tests
  • Prefereably, new tests were added which fail without the change
  • Document the changes by file in ChangeLog

Copy link
Member

@Enchufa2 Enchufa2 left a comment

Choose a reason for hiding this comment

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

LGTM!

@eddelbuettel eddelbuettel merged commit b1fce6d into master Feb 2, 2023
@eddelbuettel eddelbuettel deleted the feature/c++20_clang branch February 2, 2023 15:13
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

2 participants