isSerialisable

Eponymous template bool of whether a variable can be treated as a mutable variable, like a fundamental integral, and thus be serialised. Overload that takes a type.

  1. template isSerialisable(alias sym)
  2. template isSerialisable(T)
    template isSerialisable (
    T
    ) if (
    isType!T
    ) {
    enum isSerialisable;
    }

Parameters

T

Type to introspect.

Examples

enum E { a, b, c }
struct S {}
class C {}

static assert( isSerialisable!S);
static assert( isSerialisable!C);
static assert( isSerialisable!E);
static assert( isSerialisable!(char[]));
static assert(!isSerialisable!(char[8]));