mirror of
https://github.com/boostorg/function.git
synced 2025-06-30 22:41:07 +02:00
21 lines
296 B
C++
21 lines
296 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::function<int (int)> f;
|
|
f = boost::ref(a_function_object);
|
|
|
|
boost::function<int (int)> f2(f);
|
|
|
|
|
|
return 0;
|
|
}
|