Files
boost_function/test/mem_fun_cxx98.cpp
2003-01-19 14:44:34 +00:00

25 lines
232 B
C++

#include <boost/function.hpp>
#include <iostream>
#include <functional>
struct X {
int foo(int);
};
int X::foo(int x) { return -x; }
int main()
{
boost::function<int (X*, int)> f;
f = &X::foo;
X x;
f(&x, 5);
}