#include #include #include /* Copyright 2002, Andreas Rottmann This program shows that creating and invoking slots that return references works, if one uses */ #ifdef SIGC_CXX_NAMESPACES using namespace std; using namespace SigC; #endif int fail = 1; struct Foo { }; Foo& func() { static Foo foobar; fail = 0; return foobar; } int main(int argc,char **argv) { Slot0 s = slot(&func); s(); return fail; }