#include <iostream>
#include <boost/lambda/lambda.hpp>
#include <boost/signals.hpp>
#include <sigc++/sigc++.h>

void test_boost (void)
{
	using namespace boost::lambda;
	
	int a = -1;
	int b = -1;
	boost::signal2<void, int, int> sig;
	sig.connect((var(a) = _1 , var(b) = _2));
	sig (2, 3);
	std::cout << "BOOST: a=" << a << " b=" << b << std::endl;
}	

void test_sigc (void)
{
	using namespace sigc;
	int a = -1;
	int b = -1;
	signal<void, int, int> sig;
	sig.connect(hide_return((var(a) = _1 , var(b) = _2)));
	sig.emit (2, 3);
	std::cout << "libsigc++: a=" << a << " b=" << b << std::endl;
}

int main (void)
{
	test_boost();
	test_sigc();
	return 0;
}
