Era Scarecrow:

struct defs {
  mixin(bitfields_D!(
    bitfields!( //borrowed from std.bitmanip
      bool, "b", 1,
      uint, "i", 3,
      short, "s", 4),
    "i=2",
    "s=5"));
}

Are you able to support a syntax like:

struct defs {
  mixin(bitfields!(
      bool, "b", 1,
      uint, "i=2", 3,
      short, "s=5", 4));
}

Bye,
bearophile

Reply via email to