We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12e832c commit 08669fbCopy full SHA for 08669fb
llvm/include/llvm/ADT/STLExtras.h
@@ -1237,6 +1237,15 @@ class indexed_accessor_range
1237
}
1238
};
1239
1240
+/// Given a container of pairs, return a range over the first elements.
1241
+template <typename ContainerTy> auto make_first_range(ContainerTy &&c) {
1242
+ return llvm::map_range(
1243
+ std::forward<ContainerTy>(c),
1244
+ [](decltype((*std::begin(c))) elt) -> decltype((elt.first)) {
1245
+ return elt.first;
1246
+ });
1247
+}
1248
+
1249
/// Given a container of pairs, return a range over the second elements.
1250
template <typename ContainerTy> auto make_second_range(ContainerTy &&c) {
1251
return llvm::map_range(
0 commit comments