// Check that a cycle of polymorphic data structures can be instancated. #include forall(otype T) struct func_table; forall(otype U) struct object { func_table(U) * virtual_table; }; forall(otype T) struct func_table { void (*object_func)(object(T) *); }; void func(object(int) *) { printf("Success!\n"); } func_table(int) an_instance = { func }; int main(int argc, char * argv[]) { object(int) x = { 0p }; an_instance.object_func( &x ); return 0; }