https://issues.dlang.org/show_bug.cgi?id=23231
Issue ID: 23231
Summary: splitWhen from std.algorithm is not CTFEable
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
The following example should compile:
```
import std.algorithm.comparison : equal;
import std.range : dropExactly;
immutable source = [4, 3, 2, 11, 0, -3, -3, 5, 3, 0];
enum result1 = source.splitWhen!((a,b) => a <= b);
```
It doesn't because ChunkBy implementation is used for splitWhen and swapping
refcounter playloads are not supported due to a "fakePureCalloc" call.
--