Skip to content

Commit d16522a

Browse files
authored
Merge pull request #78169 from compnerd/results
runtime: adjust template expression for C++17 changes
2 parents b71f768 + 1dad536 commit d16522a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/swift/Runtime/Win32.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ static inline void _swift_win32_withDbgHelpLibrary(
114114
/// their old value before returning. \a body can also call \c SymSetOptions()
115115
/// if needed.
116116
template <
117-
typename F,
118-
typename R = typename std::result_of_t<F&(HANDLE /*hProcess*/)>,
119-
typename = typename std::enable_if_t<!std::is_same<void, R>::value>
117+
typename Callable,
118+
typename ResultType = std::invoke_result_t<Callable&, HANDLE>,
119+
typename = std::enable_if_t<!std::is_same_v<void, ResultType>>
120120
>
121-
static inline R _swift_win32_withDbgHelpLibrary(const F& body) {
122-
R result;
121+
static inline ResultType _swift_win32_withDbgHelpLibrary(const Callable& body) {
122+
ResultType result;
123123

124124
_swift_win32_withDbgHelpLibrary([&body, &result] (HANDLE hProcess) {
125125
result = body(hProcess);

0 commit comments

Comments
 (0)