forked from boostorg/function
Move to the "new" function<> syntax. He he.
[SVN r20320]
This commit is contained in:
@ -23,7 +23,7 @@ struct X {
|
|||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
boost::function<int, int> f;
|
boost::function<int (int)> f;
|
||||||
X x(7);
|
X x(7);
|
||||||
f = std::bind1st(std::mem_fun(&X::foo), &x);
|
f = std::bind1st(std::mem_fun(&X::foo), &x);
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ struct int_div {
|
|||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
boost::function<float, int, int> f;
|
boost::function<float (int, int)> f;
|
||||||
f = int_div();
|
f = int_div();
|
||||||
|
|
||||||
std::cout << f(5, 3) << std::endl; // 1.66667
|
std::cout << f(5, 3) << std::endl; // 1.66667
|
||||||
|
@ -23,7 +23,7 @@ main()
|
|||||||
{
|
{
|
||||||
// The second parameter should be int[], but some compilers (e.g., GCC)
|
// The second parameter should be int[], but some compilers (e.g., GCC)
|
||||||
// complain about this
|
// complain about this
|
||||||
boost::function<void, int*, int, int&, float&> sum_avg;
|
boost::function<void (int*, int, int&, float&)> sum_avg;
|
||||||
|
|
||||||
sum_avg = &do_sum_avg;
|
sum_avg = &do_sum_avg;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user