summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/ADT/STLExtras.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/ADT/STLExtras.h')
-rw-r--r--llvm/include/llvm/ADT/STLExtras.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 038f0717674..2d475e10738 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -893,7 +893,8 @@ auto partition(R &&Range, UnaryPredicate P) -> decltype(std::begin(Range)) {
/// SmallVector with elements of the vector. This is useful, for example,
/// when you want to iterate a range and then sort the results.
template <unsigned Size, typename R>
-SmallVector<detail::ValueOfRange<R>, Size> to_vector(R &&Range) {
+SmallVector<typename std::remove_const<detail::ValueOfRange<R>>::type, Size>
+to_vector(R &&Range) {
return {std::begin(Range), std::end(Range)};
}
OpenPOWER on IntegriCloud