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

Replace 'std::result_of' by 'std::invoke_result' where possible (#1025) #1028

Merged
merged 1 commit into from
Feb 4, 2019

Conversation

DanielaE
Copy link
Contributor

@DanielaE DanielaE commented Feb 3, 2019

C++17 deprecated 'std::result_of' in favour of 'std::invoke_result' and will ban it outright in C++20. Therefore

  • implement 'internal::result_of' in terms of 'std::invoke_result' when compiling C++17 mode.
  • implement 'internal::result_of' in terms of 'std::result_of' when compiling in modes C++11 or C++14.

Signed-off-by: Daniela Engert dani@ngrt.de

…ib#1025)

C++17 deprecated 'std::result_of' in favour of 'std::invoke_result' and will ban it outright in C++20. Therefore
- implement 'internal::result_of' in terms of 'std::invoke_result' when compiling C++17 mode.
- implement 'internal::result_of' in terms of 'std::result_of' when compiling in modes C++11 or C++14.

Signed-off-by: Daniela Engert <dani@ngrt.de>
@DanielaE
Copy link
Contributor Author

DanielaE commented Feb 3, 2019

This works with vs2017, vs2019, and clang8 (in my VisualStudio setup), and gcc7/gcc8 (on Travis) in C++17 mode, too.

@vitaut vitaut merged commit 61c9b56 into fmtlib:master Feb 4, 2019
@vitaut
Copy link
Contributor

vitaut commented Feb 4, 2019

Merged, thanks!

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.

2 participants