Testcases autogenerated from the Boost.Function tutorial

[SVN r16711]
This commit is contained in:
Douglas Gregor
2002-12-28 03:44:00 +00:00
parent 3b644dbfff
commit 951cb3acd4
10 changed files with 251 additions and 0 deletions

24
test/sum_avg_cxx98.cpp Normal file
View File

@ -0,0 +1,24 @@
#include <boost/function.hpp>
#include <iostream>
void do_sum_avg(int values[], int n, int& sum, float& avg)
{
sum = 0;
for (int i = 0; i < n; i++)
sum += values[i];
avg = (float)sum / n;
}
int main()
{
boost::function<void (int values[], int n, int& sum, float& avg)> sum_avg;
sum_avg = &do_sum_avg;
}