diff --git a/source/tern/algorithm/lazy_substitute.d b/source/tern/algorithm/lazy_substitute.d index d621389..08d6c01 100644 --- a/source/tern/algorithm/lazy_substitute.d +++ b/source/tern/algorithm/lazy_substitute.d @@ -8,7 +8,7 @@ import std.conv; /// Lazy substitute-based range implementation. public struct LazySubstitute(A, B, C) - if (isForward!A && isIndexable!A && isCallable!F) + if (isForward!A && isIndexable!A && isElement!(A, B) && isElement!(A, C)) { A _range; diff --git a/source/tern/algorithm/mutation.d b/source/tern/algorithm/mutation.d index 7eec87e..2aaee80 100644 --- a/source/tern/algorithm/mutation.d +++ b/source/tern/algorithm/mutation.d @@ -73,7 +73,7 @@ LazyFilter!(F, T) filter(alias F, T)(T range) * A lazy substitute of `range` using `from` and `to`. */ LazySubstitute!(A, B, C) substitute(A, B, C)(A range, B from, C to) - if (isForward!T && isIndexable!T) + if (isForward!A && isIndexable!A && isElement!(A, B) && isElement!(A, C)) { return LazySubstitute!(A, B, C)(range, from, to); }