forked from boostorg/function
Fixed broken testcases that came from tutorial sample code
[SVN r16935]
This commit is contained in:
@ -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;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user