Move to the "new" function<> syntax. He he.

[SVN r20320]
This commit is contained in:
Douglas Gregor
2003-10-09 05:00:38 +00:00
parent 8c8f072d09
commit b8d943ec27
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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

View File

@ -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;