Missing compile-time partition(ed)

Per Nordlöw per.nordlow at gmail.com
Fri Jul 16 23:24:30 UTC 2021


Is there room for a compile-time variant of `Partition` in 
`std.meta`?

`Partition` is an in-place algorithm in Phobos so maybe 
`Partitioned` would be a more suitable name.

As a replacement for patterns such as

```d
import std.meta : Filter, templateNot;
alias X = Filter!(isX, Ts);
alias UnX = Filter!(templateNot!isX, Ts);
```

Not sure about the ordering requirement. Probably not of interest 
in the compile-time case.

Also see `std.algorithm.sorting.partition`.


More information about the Digitalmars-d mailing list