auto annotation = "annotation";
static struct S {double x;}
auto as = AnnotatedOnce!S(annotation, 5);
assert(as.annotation == annotation);
assert(as.value.x == 5);
static struct C {double x;}
auto ac = AnnotatedOnce!S(annotation, 5);
assert(ac.annotation == annotation);
assert(ac.value.x == 5);
import mir.algebraic;
auto annotation = "annotation";
static struct S {double x;}
auto as = AnnotatedOnce!(Variant!S)(annotation, 5);
assert(as.annotation == annotation);
assert(as.value.x == 5);
static struct C {double x;}
auto ac = AnnotatedOnce!(Variant!S)(annotation, 5);
assert(ac.annotation == annotation);
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.