On Tuesday, 4 December 2012 at 16:42:21 UTC, Adam D. Ruppe wrote:
On Tuesday, 4 December 2012 at 16:34:50 UTC, js.mdnq wrote:
class myclass {
  int ID;
}

Try something like this:

class myclass {
   typeof(uniqueID!T.Get()) ID;
   this() {
     ID = uniqueID!T.Get();
   }
}


The typeof(expr...) can be used anywhere a type can be used.

Cool, I'll try it but ran into one problem after making my class generic. Yours should work, thanks.

Reply via email to