Index: include/llvm/ADT/STLExtras.h =================================================================== --- include/llvm/ADT/STLExtras.h +++ include/llvm/ADT/STLExtras.h @@ -117,7 +117,7 @@ iterator_category; typedef typename std::iterator_traits::difference_type difference_type; - typedef typename UnaryFunc::result_type value_type; + typedef decltype(Fn(*current)) value_type; typedef void pointer; //typedef typename UnaryFunc::result_type *pointer;