mirror of
https://github.com/boostorg/function.git
synced 2025-07-29 20:37:14 +02:00
Testcases autogenerated from the Boost.Function tutorial
[SVN r16711]
This commit is contained in:
19
test/function_ref_portable.cpp
Normal file
19
test/function_ref_portable.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
#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);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user