[llvm] [ADT] Introduce a `static_cast_to` (PR #165803)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 21:21:13 PDT 2025
================
@@ -1704,6 +1704,11 @@ auto sum_of(R &&Range, E Init = E{0}) {
return accumulate(std::forward<R>(Range), std::move(Init));
}
+/// Return a range where each value of `R` is static_cast to `T`
+template <typename T, typename R> auto static_cast_to(R &&Range) {
----------------
mtrofin wrote:
How would the usage look like?
https://github.com/llvm/llvm-project/pull/165803
More information about the llvm-commits
mailing list