mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
Merge remote-tracking branch 'upstream/stable' into merge_stable
This commit is contained in:
commit
ab307c9acf
1 changed files with 17 additions and 0 deletions
|
@ -1528,6 +1528,23 @@ if (isInputRange!Range && !isInfinite!Range &&
|
|||
assert([S(5), S(6)].extremum!"a.value" == S(5));
|
||||
}
|
||||
|
||||
// https://issues.dlang.org/show_bug.cgi?id=24027
|
||||
@safe nothrow pure unittest
|
||||
{
|
||||
class A
|
||||
{
|
||||
int a;
|
||||
this(int a)
|
||||
{
|
||||
this.a = a;
|
||||
}
|
||||
}
|
||||
|
||||
auto test = new A(5);
|
||||
A[] arr = [test];
|
||||
assert(maxElement!"a.a"(arr) is test);
|
||||
}
|
||||
|
||||
// find
|
||||
/**
|
||||
Finds an individual element in an $(REF_ALTTEXT input range, isInputRange, std,range,primitives).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue