Ticket #5522: test.cpp
| File test.cpp, 300 bytes (added by , 11 years ago) |
|---|
| Line | |
|---|---|
| 1 | #include <boost/foreach.hpp> |
| 2 | #include <iostream> |
| 3 | #include <ostream> |
| 4 | #include <vector> |
| 5 | |
| 6 | typedef std::vector< |
| 7 | int |
| 8 | > int_vector; |
| 9 | |
| 10 | int_vector const |
| 11 | test() |
| 12 | { |
| 13 | int_vector ret(2, 2); |
| 14 | |
| 15 | return ret; |
| 16 | } |
| 17 | |
| 18 | int |
| 19 | main() |
| 20 | { |
| 21 | BOOST_FOREACH( |
| 22 | int_vector::const_reference ref, |
| 23 | test() |
| 24 | ) |
| 25 | std::cout << ref << '\n'; |
| 26 | } |
