summaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm18/patches/fix-build-win-use-old-template-make_second_range.patch
blob: 32a61e27f6e65c1405bae62076536cfe715d148b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -1309,12 +1309,9 @@ template <typename ContainerTy> auto make_first_range(ContainerTy &&c) {
 
 /// Given a container of pairs, return a range over the second elements.
 template <typename ContainerTy> auto make_second_range(ContainerTy &&c) {
-  using EltTy = decltype((*std::begin(c)));
   return llvm::map_range(
       std::forward<ContainerTy>(c),
-      [](EltTy elt) ->
-      typename detail::first_or_second_type<EltTy,
-                                            decltype((elt.second))>::type {
+      [](decltype((*std::begin(c))) elt) -> decltype((elt.second)) {
         return elt.second;
       });
 }