Files
function/test/mem_fun_cxx98.cpp

27 lines
247 B
C++
Raw Normal View History

#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);
2003-01-30 04:42:06 +00:00
return 0;
}