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

19 lines
281 B
C++

#include <boost/function.hpp>
#include <iostream>
struct stateful_type { int operator()(int) const { return 0; } };
int main()
{
stateful_type a_function_object;
boost::function1<int, int> f;
f = boost::ref(a_function_object);
boost::function1<int, int> f2(f);
}