#include <iostream>
#include <sigc++/slot.h>


void Foo() { std::cout << "Foo" << std::endl; }
void Bar() { std::cout << "Bar" << std::endl; }


int main(void)
{
   sigc::slot<void> nullSlot;
   
   sigc::slot<void> theSlot = sigc::ptr_fun(&Foo);
   theSlot = nullSlot; // This seems to do nothing.
   theSlot();

   theSlot.disconnect(); // This also seems to do nothing.
   theSlot();

   theSlot = sigc::ptr_fun(&Bar); // ... but this works.
   theSlot();

   // Expected output:
   // Bar

   return 0;
}
