Is it possible to do conditional compilation inside an array initializer? Something like this:
int[] inttable =
[
    1,
    4,
version(smth)  {  // <--- does not compile
    5,
    6,
}
    8,
  1345
];

(real world case: https://github.com/ldc-developers/ldc/blob/merge-2.069/ddmd/idgen.d#L279)

If it is not possible, what alternative solution would you use?

Thanks!

Reply via email to