// -*- c++ -*- /* Copyright 2002, The libsigc++ Development Team * Assigned to public domain. Use as you wish without restriction. */ #include #include #include //The Tru64 compiler seems to need this to avoid an unresolved symbol //See bug #161503 #include SIGC_USING_STD(new) SIGC_USING_STD(cout) SIGC_USING_STD(endl) SIGC_USING_STD(string) class foo { public: void operator()(int i) {std::cout << "foo(int "< s1 = foo(); s1(1); s1 = foo(); s1(2); // test implicit conversion sigc::slot s2 = foo(); s2(3); // test reference sigc::slot sl1 = foo(); std::string str("guest book"); sl1(str); std::cout << str << std::endl; // test operator= str = "guest book"; sigc::slot sl2; sl2 = sl1; sl1 = sl2; sl1(str); std::cout << str << std::endl; // test copy ctor sigc::slot s1_clone(s1); }