[llvm] b337735 - Fix build failures with MSVC 14.x

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 09:51:15 PDT 2023


Author: Rahul Joshi
Date: 2023-03-28T09:50:57-07:00
New Revision: b337735390659a7aa79bcefd1bebb89d7f278194

URL: https://github.com/llvm/llvm-project/commit/b337735390659a7aa79bcefd1bebb89d7f278194
DIFF: https://github.com/llvm/llvm-project/commit/b337735390659a7aa79bcefd1bebb89d7f278194.diff

LOG: Fix build failures with MSVC 14.x

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 155d5c31408a5..9c56fe9bc24ab 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -2320,7 +2320,7 @@ template <typename... Refs> struct enumerator_result<std::size_t, Refs...> {
   /// Returns the value at index `I`. This case covers references to the
   /// iteratees.
   template <std::size_t I, typename = std::enable_if_t<I != 0>>
-  friend std::tuple_element_t<I, value_reference_tuple>
+  friend decltype(auto)
   get(const enumerator_result &Result) {
     // Note: This is a separate function from the other `get`, instead of an
     // `if constexpr` case, to work around an MSVC 19.31.31XXX compiler


        


More information about the llvm-commits mailing list