reader/wgsl: Replace std::result_of with std::invoke_result

With C++17, std::result_of has been deprecated and superceeded with std::invoke_result.
std::result_of triggers a compiler warning about use of a deprecated feature, which is causing the ossfuzz builds to fail

Issue: oss-fuzz:43441
Change-Id: Ie4ed670dd5b25b9059d5feb8056e37a22dad3cbf
Kokoro: Kokoro <>
Reviewed-by: Antonio Maiorano <>
Commit-Queue: Ben Clayton <>
diff --git a/src/reader/wgsl/parser_impl.h b/src/reader/wgsl/parser_impl.h
index 2037150..77c97e2 100644
--- a/src/reader/wgsl/parser_impl.h
+++ b/src/reader/wgsl/parser_impl.h
@@ -695,7 +695,7 @@
   /// ReturnType resolves to the return type for the function or lambda F.
   template <typename F>
-  using ReturnType = typename std::result_of<F()>::type;
+  using ReturnType = typename std::invoke_result<F>::type;
   /// ResultType resolves to `T` for a `RESULT` of type Expect<T>.
   template <typename RESULT>