Storing "auto" types in classes

Rob Adelberg radelberg36 at gmail.com
Fri Jul 2 09:46:37 PDT 2010


I'm sure this has come up before, but I want to store something like an
std.array appender in a class.  All of the examples use auto for the type but
you can't put that in a class definition, so what do you put?

Example:
class packet{...}

class A {

   packet []  packetlist;
   appender!(packet) packappender;   // wrong format

   this () {
      packetlist = new packet[0];
      packappender = appender(&packetlist);
   }
   :
}

What's the format to store the appender in the class?


More information about the Digitalmars-d-learn mailing list