auto annotations = ["annotation"];
static struct S {double x;}
auto as = Annotated!S(annotations, 5);
assert(as.annotations == annotations);
assert(as.value.x == 5);
static struct C {double x;}
auto ac = Annotated!S(annotations, 5);
assert(ac.annotations == annotations);
assert(ac.value.x == 5);
import mir.algebraic;
auto annotations = ["annotation"];
static struct S {double x;}
auto as = Annotated!(Variant!S)(annotations, 5);
assert(as.annotations == annotations);
assert(as.value.x == 5);
static struct C {double x;}
auto ac = Annotated!(Variant!S)(annotations, 5);
assert(ac.annotations == annotations);
assert(ac.value.x == 5);
A convenience definition of an annotated value.
A structure that behaves like a recursive algebraic type should define enum _serdeRecursiveAlgebraic; member.