minElement on array of const objects

Aurelien Fredouelle aurelien.fredouelle+dlang at gmail.com
Tue Nov 14 09:33:45 UTC 2017


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.d#L1340
>
> And here
> https://github.com/dlang/phobos/blob/master/std/algorithm/searching.d#L1301
> https://github.com/dlang/phobos/blob/master/std/algorithm/searching.d#L1355
> is necessary something like RebindableOrUnqual instead of 
> Unqual:
>
> template RebindableOrUnqual(T){
> 	static if (is(T == class) || is(T == interface) || 
> isDynamicArray!T || isAssociativeArray!T)alias 
> RebindableOrUnqual = Rebindable!T;
> 	else alias RebindableOrUnqual = Unqual!T;
> }

Thanks, I filed https://issues.dlang.org/show_bug.cgi?id=17982 to 
track the issue.


More information about the Digitalmars-d-learn mailing list