On Sunday, 11 November 2012 at 10:36:42 UTC, Jacob Carlborg wrote:
This won't work. The "node" template doesn't evaluate to a type and you wouldn't use it as a mixin if it did.

But this is works! Why?

mixin template node() {
  alias int E;
  E prev, next;
}

struct list(alias N) {
  N.E head;
  N.E tail;
}

class A {
  mixin node L1;
  mixin node L2;
}

list!(A.L1) l1;
list!(A.L2) l2;


Reply via email to