sortUniq

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 24 09:02:59 PST 2015


On 1/24/15 7:17 AM, zeljkog wrote:
>
> private struct FilterResult(alias predicate, Range)
> {
>      static if (is(predicate == struct))
>          predicate pred;
>      else
>          alias pred = predicate;
> ...

The problem is here - the creation of an empty object is unlikely to be 
of use to the caller. We should, however, support the case when the 
caller passes a stateful predicate into the call. -- Andrei


More information about the Digitalmars-d mailing list