Fixed broken testcases that came from tutorial sample code

[SVN r16935]
This commit is contained in:
Douglas Gregor
2003-01-19 14:44:34 +00:00
parent 4a46b5e1b9
commit 09657f1134
12 changed files with 26 additions and 25 deletions

View File

@ -6,20 +6,21 @@
float mul_ints(int x, int y) { return ((float)x) * y; }
struct int_div {
float operator()(int x, int y) const { return ((float)x)/y; };
};
int main()
{
boost::function2<float, int, int> f;
struct int_div {
float operator()(int x, int y) const { return ((float)x)/y; };
};
f = int_div();
std::cout << f(5, 3) >> std::endl;
std::cout << f(5, 3) << std::endl;
if (f)
@ -34,4 +35,3 @@ f = 0;
f = &mul_ints;
}