Skip to content

Commit

Permalink
Don't use std::result_of
Browse files Browse the repository at this point in the history
It's removed in C++20

Bug: 175635923
Test: m libidlcli
Test: m lshal
Change-Id: I4301ad34a1c5db73530cefdbba3968bc3ac3c0a2
  • Loading branch information
twasilczyk committed Jan 10, 2024
1 parent 3970015 commit 2ed90a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmds/idlcli/vibrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ inline auto getService<android::hardware::vibrator::V1_3::IVibrator>(std::string
}

template <typename I>
using shared_ptr = std::result_of_t<decltype(getService<I>)&(std::string)>;
using shared_ptr = std::invoke_result_t<decltype(getService<I>)&, std::string>;

template <typename I>
class HalWrapper {
Expand Down
2 changes: 1 addition & 1 deletion cmds/lshal/Timeout.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace lshal {
// has returned, especially if deadline has been reached. Hence, care must be taken when passing
// data between the background thread and the main thread. See b/311143089.
template<class R, class P, class Function, class I, class... Args>
typename std::result_of<Function(I *, Args...)>::type
typename std::invoke_result<Function, I *, Args...>::type
timeoutIPC(std::chrono::duration<R, P> wait, const sp<I> &interfaceObject, Function &&func,
Args &&... args) {
using ::android::hardware::Status;
Expand Down

0 comments on commit 2ed90a5

Please sign in to comment.