www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Missing compile-time partition(ed)

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`.
Jul 16