Custom allocators are useful for performance (e.g., std.regex internally uses its custom allocator)and std.experimental.allocator provides a generic interface for them: `make` family and `dispose` family.
However, current interface of std.experimental.allocator prevents functions that use custom allocator from CTFEability.
It would be nice if `make` family and `dispose` family can provide an interface that enables CTFEability while keeping its flexibility.
Here is a current interface of `make`.
```dlang
auto make(T, Allocator, A...)(auto ref Allocator alloc, auto ref A args);
```
A problem is that it takes a custom allocator as a runtime parameter.
If `make` take a custom allocator as a template alias parameter, we will solve this issue.
PoC: https://run.dlang.io/is/WYSaLd
Comment #1 by robert.schadek — 2024-12-01T16:39:41Z