[llvm] r298645 - Remove unnecessary use of std::result_of, which is deprecated in C++17.

Richard Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 14:02:31 PDT 2017


Author: rsmith
Date: Thu Mar 23 16:02:31 2017
New Revision: 298645

URL: http://llvm.org/viewvc/llvm-project?rev=298645&view=rev
Log:
Remove unnecessary use of std::result_of, which is deprecated in C++17.

Modified:
    llvm/trunk/include/llvm/ADT/STLExtras.h

Modified: llvm/trunk/include/llvm/ADT/STLExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/STLExtras.h?rev=298645&r1=298644&r2=298645&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/STLExtras.h (original)
+++ llvm/trunk/include/llvm/ADT/STLExtras.h Thu Mar 23 16:02:31 2017
@@ -140,9 +140,8 @@ public:
           iterator_category;
   typedef typename std::iterator_traits<RootIt>::difference_type
           difference_type;
-  typedef typename std::result_of<
-            UnaryFunc(decltype(*std::declval<RootIt>()))>
-          ::type value_type;
+  typedef decltype(std::declval<UnaryFunc>()(*std::declval<RootIt>()))
+          value_type;
 
   typedef void pointer;
   //typedef typename UnaryFunc::result_type *pointer;




More information about the llvm-commits mailing list