mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
Change struct Rebindable to just use cast()
if this is sufficient.
This works better at compiletime.
This commit is contained in:
parent
b818901e63
commit
2f6b2efaf7
2 changed files with 86 additions and 21 deletions
|
@ -1498,6 +1498,10 @@ if (isInputRange!Range && !isInfinite!Range &&
|
|||
assert(d.extremum!`a > b` == 10);
|
||||
assert(d.extremum!(a => a, `a > b`) == 10);
|
||||
}
|
||||
|
||||
// compiletime
|
||||
enum ctExtremum = iota(1, 5).extremum;
|
||||
assert(ctExtremum == 1);
|
||||
}
|
||||
|
||||
@nogc @safe nothrow pure unittest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue