From cfcb1e727a777b26f2b43e297e7a846fdaa58f0d Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 29 May 2022 21:43:08 +0200 Subject: Fix foldr scope --- source/tanya/algorithm/iteration.d | 2 +- source/tanya/algorithm/mutation.d | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/tanya/algorithm/iteration.d b/source/tanya/algorithm/iteration.d index aae83f1..8074fc1 100644 --- a/source/tanya/algorithm/iteration.d +++ b/source/tanya/algorithm/iteration.d @@ -226,7 +226,7 @@ if (F.length == 1) * * Returns: Accumulated value. */ - auto foldr(R, T)(R range, auto ref T init) + auto foldr(R, T)(scope R range, scope return auto ref T init) if (isBidirectionalRange!R) { if (range.empty) diff --git a/source/tanya/algorithm/mutation.d b/source/tanya/algorithm/mutation.d index 88f7da3..6a6edd6 100644 --- a/source/tanya/algorithm/mutation.d +++ b/source/tanya/algorithm/mutation.d @@ -177,9 +177,7 @@ if (isInputRange!Range && hasLvalueElements!Range) import tanya.memory.op : copy, fill; alias T = ElementType!Range; - static if (__VERSION__ >= 2083 - && isDynamicArray!Range - && __traits(isZeroInit, T)) + static if (isDynamicArray!Range && __traits(isZeroInit, T)) { fill!0(range); } -- cgit v1.2.3