dsimcha , dans le message (digitalmars.D:144293), a écrit :
> If you mean just making functions like T newArray(Allocator)(Allocator 
> allocator,
> size_t size), etc., I've mentioned before that having the type available to 
> the
> allocator is often useful and therefore these defaults need to be 
> overrideable.
> Otherwise, please clarify.


Maybe something like:

auto newArray(T, Allocator)(Allocator allocator, size_t size)
if (is(typeof(allocator.newArray!T(size))==T[])
{
  return allocator.newArray!T(size);
}

Reply via email to