// Copyright (C) Frank Mori Hess 2009

// Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/bind.hpp>
#include <boost/function.hpp>

template<typename F, typename A1>
	void binder_template(const F &func,
		const A1 &arg1
// forwarding arg1 by value instead of as a const reference fixes compile error on gcc 4.0.1
//		A1 arg1
	)
{
	boost::function1<int, int> x = boost::bind(func, arg1);
}

int f(int x)
{
	return x;
}

int main()
{
	binder_template(&f, _1);

  return 0;
}
