On Wednesday, 21 March 2012 at 15:20:35 UTC, F i L wrote:
Andrei Alexandrescu wrote:
In case there are several non-serialized variables, how do you avoid clashes between different definitions of __nonSerialized?

struct A {
   int a, b;
   mixin NonSerialized!(a, b);
}

static const __nonSerialized = ["a", "b"];

Also, if where meant how could you store multiple types, you could just use an Associative Array:

struct A {
  int a;
  float b;
  mixin NonSerialized!(a, b);
}

static const __nonSerialized = ["int":"a", "int":"b"];


Reply via email to