Remove obsolete workaround (#10641)

For resolved bugzilla issue 15777
This commit is contained in:
Inkrementator 2025-02-18 23:42:13 +01:00 committed by GitHub
parent bb0c2953dd
commit d4dd391123
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -446,13 +446,10 @@ if (fun.length >= 1)
auto map(Range)(Range r) auto map(Range)(Range r)
if (isInputRange!(Unqual!Range)) if (isInputRange!(Unqual!Range))
{ {
import std.meta : AliasSeq, staticMap; import std.meta : staticMap;
import std.functional : adjoin;
alias RE = ElementType!(Range); alias RE = ElementType!(Range);
static if (fun.length > 1)
{
import std.functional : adjoin;
import std.meta : staticIndexOf;
alias _funs = staticMap!(unaryFun, fun); alias _funs = staticMap!(unaryFun, fun);
alias _fun = adjoin!_funs; alias _fun = adjoin!_funs;
@ -465,17 +462,6 @@ if (fun.length >= 1)
static assert(!is(typeof(f(RE.init)) == void), static assert(!is(typeof(f(RE.init)) == void),
"Mapping function(s) must not return void: " ~ _funs.stringof); "Mapping function(s) must not return void: " ~ _funs.stringof);
} }
}
else
{
alias _fun = unaryFun!fun;
alias _funs = AliasSeq!(_fun);
// Do the validation separately for single parameters due to
// https://issues.dlang.org/show_bug.cgi?id=15777.
static assert(!is(typeof(_fun(RE.init)) == void),
"Mapping function(s) must not return void: " ~ _funs.stringof);
}
return MapResult!(_fun, Range)(r); return MapResult!(_fun, Range)(r);
} }