From 8cbe32c50196e52b8b4178e7868542dcdcd6f4cc Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Fri, 26 Aug 2022 20:31:55 -0700 Subject: [PATCH] Switch from std::result_of to std::invoke_result std::result_of is deprecated in C++17 and removed in C++20. std::invoke_result is added in C++17. Upstream libc++ has started removing the declaration of std::result_of when a new-enough C++ dialect is selected, so switch to the supported type. Bug: http://b/175635923 Test: treehugger Change-Id: Ie2db3e092b4300e20858097ac4e88ebaedc7ae07 --- staticlibs/netd/libnetdutils/Syscalls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staticlibs/netd/libnetdutils/Syscalls.cpp b/staticlibs/netd/libnetdutils/Syscalls.cpp index 9f653f70c7..7e1a242635 100644 --- a/staticlibs/netd/libnetdutils/Syscalls.cpp +++ b/staticlibs/netd/libnetdutils/Syscalls.cpp @@ -26,7 +26,7 @@ namespace { // Retry syscall fn as long as it returns -1 with errno == EINTR template -typename std::result_of::type syscallRetry(FnT fn, Params&&... params) { +typename std::invoke_result::type syscallRetry(FnT fn, Params&&... params) { auto rv = fn(std::forward(params)...); while ((rv == -1) && (errno == EINTR)) { rv = fn(std::forward(params)...);