On Monday, 13 November 2017 at 14:28:27 UTC, vit wrote:
On Monday, 13 November 2017 at 12:15:26 UTC, Nathan S. wrote:
[...]
Is Unqual necessary here?:
https://github.com/dlang/phobos/blob/master/std/algorithm/searching.d#L1284
https://github.com/dlang/phobos/blob/master/std/algorithm/searching
On Monday, 13 November 2017 at 12:15:26 UTC, Nathan S. wrote:
Unqual!Element seed = r.front;
alias MapType = Unqual!(typeof(mapFun(CommonElement.init)));
This looks like a job for std.typecons.Rebindable!(const A)
instead of Unqual!(const A) which is used currently. I am
surprised that thi
Unqual!Element seed = r.front;
alias MapType = Unqual!(typeof(mapFun(CommonElement.init)));
This looks like a job for std.typecons.Rebindable!(const A)
instead of Unqual!(const A) which is used currently. I am
surprised that this is the first time anyone has run into this.
On Monday, 13 November 2017 at 10:20:51 UTC, Aurelien Fredouelle
wrote:
Hi all,
It seems that it is not possible to use minElement on an array
of const objects:
class A
{
int val;
}
const(A) doStuff(const(A)[] v)
{
import std.algorithm.searching : minElement;
return v.minElement!"a.val
Hi all,
It seems that it is not possible to use minElement on an array of
const objects:
class A
{
int val;
}
const(A) doStuff(const(A)[] v)
{
import std.algorithm.searching : minElement;
return v.minElement!"a.val";
}
This gets the following compiler error:
std/algorithm/searching.d(