struct Sig { alias I = int; int x; float y; struct Inner { int a; struct X { int b; } } int f(int) { return 0; } enum X { one, two } union L { int a; } } struct Y { mixin Models!Sig; alias I = int; int x; float y; struct Inner { int a; struct X { int b; } } int f(int) { return 0; } enum X { one, two } union L { int a; } } static assert(isModelOf!(Y, Sig));
Mixin that ensures a type models the desired signature of a structure