-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Use of deprecated function call (result_of) #1025
Comments
You are right. In C++20 @vitaut: do you happen to have an idea about that I am doing wrong? |
Nevermind - I got it ... |
…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>
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>
This is just a minor issue but I thought I ought to mention it anyway. The core.h file contains calls to the deprecated function result_of. result_of has been deprecated since the release of C++17 based on these reasons and should not be used. std::invoke_result is the preferred method instead nowadays.
... fmt/bundled/core.h:215:25: error: 'result_of<fmt::v5::internal::precision_checker<fmt::v5::internal::error_handler> (int)>' is deprecated: warning STL4014: std::result_of and std::result_of_t are deprecated in C++17. They are superseded by std::invoke_result and std::invoke_result_t. You can define _SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning. [clang-diagnostic-deprecated-declarations] typedef typename std::result_of<
The text was updated successfully, but these errors were encountered: