FWIW: How to allocate any type

downs default_357-line at yahoo.de
Mon Mar 23 14:57:11 PDT 2009


struct Temp(T) {
  T t;
}

T* allocate(T)() {
  auto wrap = new Temp!(T);
  return &wrap.t;
}



More information about the Digitalmars-d mailing list