#include #include #include #include #include struct Server { int val; inline actor; }; void ?{}( Server & this ) { this.val = 999; } void ^?{}( Server & this ) { this.val = 777; } int main() { sout | "Start"; sout | "Finished"; { actor_start(); Server s[10]; for ( i; 10 ) { s[i] | finished_msg; } actor_stop(); } sout | "Delete"; { actor_start(); for ( i; 10 ) { Server * s = alloc(); (*s){}; (*s) | delete_msg; } actor_stop(); } sout | "Destroy"; { actor_start(); Server s[10]; for ( i; 10 ) s[i] | destroy_msg; actor_stop(); for ( i; 10 ) if (s[i].val != 777) sout | "Error: dtor not called correctly."; } sout | "Done"; }