Ticket #6974: optional.cpp
| File optional.cpp, 339 bytes (added by , 10 years ago) |
|---|
| Line | |
|---|---|
| 1 | #include <boost/function/function0.hpp> |
| 2 | #include <boost/optional/optional.hpp> |
| 3 | #include <boost/fusion/container/vector.hpp> |
| 4 | |
| 5 | void foo() |
| 6 | { |
| 7 | typedef boost::function0<void> func_type; |
| 8 | typedef boost::fusion::vector1<func_type> data_type; |
| 9 | |
| 10 | boost::optional<data_type> opt; |
| 11 | boost::optional<data_type> opt2(opt); |
| 12 | |
| 13 | opt2 = opt; |
| 14 | } |
