Skip to content

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