llvm.org GIT mirror llvm / 4000c17
Add a map_range function for applying map_iterator to a range. In preparation for use in Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363477 91177308-0d34-0410-b5e6-96231b3b80d8 Richard Smith 1 year, 3 months ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
239239 return mapped_iterator(std::move(I), std::move(F));
240240 }
241241
242 template
243 auto map_range(ContainerTy &&C, FuncTy F)
244 -> decltype(make_range(map_iterator(C.begin(), F),
245 map_iterator(C.end(), F))) {
246 return make_range(map_iterator(C.begin(), F), map_iterator(C.end(), F));
247 }
248
242249 /// Helper to determine if type T has a member called rbegin().
243250 template class has_rbegin_impl {
244251 using yes = char[1];