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