--- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -1309,12 +1309,9 @@ template auto make_first_range(ContainerTy &&c) { /// Given a container of pairs, return a range over the second elements. template auto make_second_range(ContainerTy &&c) { - using EltTy = decltype((*std::begin(c))); return llvm::map_range( std::forward(c), - [](EltTy elt) -> - typename detail::first_or_second_type::type { + [](decltype((*std::begin(c))) elt) -> decltype((elt.second)) { return elt.second; }); }